简体   繁体   中英

Autorun firefox extension

I am creating firefox extensions and I want to autostart extensions with browser. Without any click, it's just start in background. I know this is possible, for example ghoster plugin can do it, but its code is huge, so it take me too much time to analyze it. And by the way, I don't want wait to any page load, or anything. Immediately after firefox start. Any hints ?

The code of the extension is able to run as soon as the browser loads. You probably just have to add an eventlistener to let the extension know that the browser is ready:

window.addEventListener("load",function() {yourBrowserLoadFunction();}, false);

The code inside the function yourBrowserLoadFunction() will run as soon as the browser starts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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