点击使弹出disapear [英] Click make popup disapear

查看:105
本文介绍了点击使弹出disapear的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发Chrome扩展程序,以便在浏览其他网站时在弹出窗口中观看YouTube视频。



它工作得很好,问题是如果我点击链接或切换全屏应用程序(Mac)弹出窗口,我怎样才能让弹出窗口保持永久?



清单:

  {
manifest_version :2,

名称:一键式Youtube,
说明:点击Youtube,
版本:1.0,
$ b $permissions:[tabs,contextMenus],
browser_action:{
default_icon:icon.png,
default_popup :ytplayer.html
}
}


解决方案你不能。弹出窗口会在关闭时关闭并销毁页面。



这是行为设计;你需要一个不同的用户界面,也许用类型打开一个窗口:popup



href =https://stackoverflow.com/questions/11614493/how-does-extension-chat-for-google-create-the-panel-window>窗口类型面板 变得可用,你的问题可以得到更好的解决。


I'm currently developping a chrome extension in order to watch youtube videos in a popup window while browsing an other website.

It works just fine, the problem is that if I click on a link or switch fullscreen app (Mac) the popup disapear, how can I make the popup bubble stay "for ever" ?

The manifest :

{
  "manifest_version": 2,

  "name": "One-Click Youtube",
  "description": "Youtube on one click",
  "version": "1.0",

  "permissions": ["tabs" , "contextMenus"],
  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "ytplayer.html"
  }
}

解决方案

You cannot. The popup will always close and destroy the page when it loses focus.

This behavior is by design; you need a different UI, maybe open a window with type: "popup".

If and when window type "panel" becomes available, your question can be solved better.

这篇关于点击使弹出disapear的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆