如何从 background.html 以编程方式打开 chrome 扩展弹出窗口 [英] How to programmatically open a chrome extension popup window from background.html

查看:24
本文介绍了如何从 background.html 以编程方式打开 chrome 扩展弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提前致谢!

我想要实现的是当我的扩展程序在网页上检测到特殊标签时打开弹出窗口.搜索了一段时间后,似乎只有在用户单击扩展程序时才能打开弹出窗口.这是真的吗?

What I want to achieve is to open the popup window when a special tag is detected on a webpage by my extension. After searching for a while it seems like the popup can only be opened when user clicks the extension. Is it true?

或者我可以在浏览器上获取我的扩展程序图标的位置吗?也许我可以画一个窗口并显示在扩展程序图标下,使其看起来像弹出窗口.

Or could I get the location of my extension's icon on browser? Maybe I could draw a window and display under the extension icon to make it looks just like the popup window.

推荐答案

这个家伙想要相反的效果并且不能让他的弹出窗口不打开.看看他的代码来打开你的弹出页面;)

This guy wants opposite effect and can't get his popup window not to open. Take a look at his code to open your popup page ;)

这篇关于如何从 background.html 以编程方式打开 chrome 扩展弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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