1 /* coded by Ketmar // Invisible Vector (psyc://ketmar.no-ip.org/~Ketmar)
2 * Understanding is not required. Only obedience.
4 * This program is free software. It comes without any warranty, to
5 * the extent permitted by applicable law. You can redistribute it
6 * and/or modify it under the terms of the Do What The Fuck You Want
7 * To Public License, Version 2, as published by Sam Hocevar. See
8 * http://www.wtfpl.net/txt/copying/ for more details.
10 ////////////////////////////////////////////////////////////////////////////////
19 let guerillaOptions
= {
24 ////////////////////////////////////////////////////////////////////////////////
25 // load "include/basic.js", which will provide various services
27 const Cu
= global
.Components
.utils
;
29 Cu
.import("resource://gre/modules/Services.jsm", scope
);
30 let uri
= scope
.Services
.io
.newURI(global
.__SCRIPT_URI_SPEC__
+"/../includes/basic.js", null, null);
32 scope
.Services
.scriptloader
.loadSubScript(uri
.spec
, global
);
34 Cu
.reportError("INIT ERROR "+e
.name
+": "+e
.message
)
36 Cu
.reportError(e
.stack
);
42 ////////////////////////////////////////////////////////////////////////////////
47 let {oneShotTimer
, intervalTimer
} = require("timer");
48 addExport("oneShotTimer", oneShotTimer
);
49 addExport("intervalTimer", intervalTimer
);
51 let scacheAPI
= require("scriptcache");
52 addExport("scacheAPI", scacheAPI
);
54 let {wlRegister
, wlUnregister
, deinitInjectorStorage
} = require("injector");
56 let {gcliInit
, gcliDeinit
} = require("concmd");
59 ////////////////////////////////////////////////////////////////////////////////
60 // ADDON_INSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE
61 function install (data
, reason
) {}
64 // ADDON_UNINSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE
65 function uninstall (data
, reason
) {}
68 ////////////////////////////////////////////////////////////////////////////////
69 // APP_STARTUP, ADDON_ENABLE, ADDON_INSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE
70 function startup (data
, reason
) {
71 //scacheAPI.validate();
72 setDefaultPrefs(); // always set the default prefs as they disappear on restart
79 // APP_SHUTDOWN, ADDON_DISABLE, ADDON_UNINSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE
80 function shutdown (data
, reason
) {
81 deinitInjectorStorage();
82 //if (reason == APP_SHUTDOWN) return;