diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-02-02 13:50:44 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-02-02 13:50:44 (GMT) |
commit | 6ead22274f5bdd5b88e652a5d6a1bba3e5c307d0 (patch) | |
tree | be03623c0a03f6e000c40701c4fceaea5b1f0857 /addon/lib/main.js | |
parent | 2cb5bb36e94a777ce4ab12f8d7fd755d8a24e331 (diff) |
Basic firefox addon
Diffstat (limited to 'addon/lib/main.js')
-rw-r--r-- | addon/lib/main.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/addon/lib/main.js b/addon/lib/main.js new file mode 100644 index 0000000..f99e0e9 --- /dev/null +++ b/addon/lib/main.js @@ -0,0 +1,23 @@ +const {Cu} = require("chrome"); +Cu.import("resource://gre/modules/ctypes.jsm"); + +libc = ctypes.open("libc.so.6"); +var getpid = libc.declare("getpid", + ctypes.default_abi, + ctypes.int); +console.log(getpid()); + +var windowUtils = require("window-utils"); + +windowUtils = new windowUtils.WindowTracker({ + onTrack: function (window) { + var toolbox = window.document.getElementById("navigator-toolbox"); + toolbox.style.display = "none"; + + var addonbar = window.document.getElementById("addon-bar"); + addonbar.style.display = "none"; + + var content = window.document.getElementById("content"); + content.getNotificationBox().removeCurrentNotification(); + } +}); |