将 JavaScript 转换为 Firefox 扩展
嗨,我几乎是一个初学者。我需要一些帮助将此脚本转换为 Firefox 的浏览器扩展。
脚本:
window.onload = function () {
setInterval(function(){
window.open( "http://www.google.com/" );
}, 3000);
};
*我知道这会给用户带来不便,这只是实验性的。
hi im pretty much a beginner.I need some help turning this script in an browser extension for firefox.
The script:
window.onload = function () {
setInterval(function(){
window.open( "http://www.google.com/" );
}, 3000);
};
*I know this would be inconvenient to the users,its just experimental.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要按照以下指南开始 Firefox 扩展开发:http://kb.mozillazine.org/Getting_started_with_extension_development - 它将为您提供最简单的扩展。
然后,要将 JavaScript 挂钩到页面加载事件,请遵循以下指南:https://developer.mozilla。 org/en/Code_snippets/On_page_load
You will need to start your Firefox extension development by following this guide: http://kb.mozillazine.org/Getting_started_with_extension_development - it will get you the simplest extension.
Then, to hook your JavaScript to page load event you follow this guide: https://developer.mozilla.org/en/Code_snippets/On_page_load