简体   繁体   English

如何使Chrome扩展程序窗口始终位于顶部

[英]How can I make my Chrome Extension window always on top

在此处输入图片说明

I want to make my chrome extension popup window always on top. 我想将chrome扩展程序弹出窗口始终置于顶部。

But I can't find how to do it. 但是我找不到方法。

Please let me know if you know how to do it. 如果您知道该怎么做,请告诉我。

I am looking for a solution for this problem and currently it is not possible to keep the pop up always active. 我正在寻找解决此问题的方法,目前无法使弹出窗口始终处于活动状态。

Maybe it can work to create a new window when opening the pop up, something like this. 也许可以在打开弹出窗口时创建一个新窗口,诸如此类。

In the file popup.html you must load this script. 在文件popup.html中,您必须加载此脚本。

const popupWindow = window.open(
chrome.extension.getURL("popup_window.html"),
"exampleName",
"width=300,height=300");
window.close();

Then you must place the contents of your popup inside the file popup_windows.html 然后,您必须将弹出式窗口的内容放入文件popup_windows.html中

I hope this can help you. 希望对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM