Skip to content

Instantly share code, notes, and snippets.

View gbosetti's full-sized avatar
🎯
Focusing

Gabri Bosetti gbosetti

🎯
Focusing
View GitHub Profile
@Noitidart
Noitidart / bootstrap.js
Created January 31, 2014 08:26
Bootstrap addon demo. Shows how to add a sidebar to all browsing windows. More specifically, a sidebar which allows HTML content.
const {interfaces: Ci, utils: Cu} = Components;
Cu.import('resource://gre/modules/Services.jsm');
/*start - windowlistener*/
var windowListener = {
//DO NOT EDIT HERE
onOpenWindow: function (aXULWindow) {
// Wait for the window to finish loading
let aDOMWindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow);
aDOMWindow.addEventListener("load", function () {