Open Infocatcher opened 9 years ago
D'oh, how to detect browser with about:home without global content script:
var mm = Components.classes["@mozilla.org/globalmessagemanager;1"]
.getService(Components.interfaces.nsIMessageListenerManager);
var listener = {
receiveMessage: function(msg) {
mm.removeMessageListener("AboutHome:RequestUpdate", this);
var browser = msg.target;
alert(browser.currentURI.spec);
}
};
mm.addMessageListener("AboutHome:RequestUpdate", listener);
gBrowser.addTab("about:home");
Separated from https://github.com/Infocatcher/Download_Panel_Tweaker/issues/32#issuecomment-66886405 And bug 1051238 – frame scripts are cached forever & thus can't be updated restartless. :(