[英]Chrome Extension - Autorun
I am wondering if it is possible to automatically run my extension (or a function in my extension) each time a page loads? 我想知道是否可以在每次页面加载时自动运行扩展程序(或扩展程序中的功能)? Right now, I have it set that you would click the icon Browser Action icon to run my extension.
现在,我已设置好您可以单击图标“浏览器操作”图标来运行我的扩展程序。
You've got two options: 您有两种选择:
chrome.tabs.onUpdated
event. chrome.tabs.onUpdated
事件的背景页面 。 Use the chrome.tabs.executeScript
method to inject script. chrome.tabs.executeScript
方法来注入脚本。 See also: 也可以看看:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.