[英]How to make Chrome Extension popup draggable?
I noticed that the 1password chrome extension browser action popup is draggable.我注意到 1password chrome 扩展浏览器操作弹出窗口是可拖动的。 How can I make my own chrome extension do the same thing?我怎样才能让我自己的 chrome 扩展做同样的事情? I can't seem to find anything in the chrome extension docs.我似乎在 chrome 扩展文档中找不到任何内容。
A few other features the 1password chrome extension popup has that I also can't find in the docs. 1password chrome 扩展弹出窗口的其他一些功能我在文档中也找不到。
The standard popup window cannot be dragged, neither you can add anything outside of its borders.标准弹出窗口 window 不能拖动,也不能在其边界之外添加任何内容。 It's a popup page declared via browser_action or page_action in manifest.json.它是通过 manifest.json 中的browser_action或page_action声明的弹出页面。
The workarounds are:解决方法是:
type
parameter as 'popup'
将type
参数指定为'popup'
To inspect pages that block the context menu you can open devtools from the browser menu, then "More tools", or focus the address bar first, then press the hotkey to open devtools ( Ctrl Shift i or F12 in Windows) or from the internal UI page chrome://inspect/#pages
.要检查阻止上下文菜单的页面,您可以从浏览器菜单打开 devtools,然后是“更多工具”,或者首先关注地址栏,然后按热键打开 devtools(在 Windows 中为Ctrl Shift i或F12 )或从内部UI 页面chrome://inspect/#pages
。
PS technically you can write an external utility and run it via nativeMessaging so it'll use a low-level OS API to move the standard popup window, but that's very fragile. PS 从技术上讲,您可以编写一个外部实用程序并通过nativeMessaging运行它,因此它将使用低级操作系统 API 来移动标准弹出窗口 window,但这非常脆弱。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.