Created
April 3, 2011 14:05
Revisions
-
xulapp revised this gist
Jun 23, 2011 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ // ==uc== // @include * // @exclude chrome://browser/content/preferences/preferences.xul // ==/uc== -
xulapp created this gist
Apr 3, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,51 @@ // ==uc== // @include * // ==/uc== (function Bug330458() { var orgLoadOverlay = document.loadOverlay; var queue = []; var loading = false; function Observer(org) { this.org = org; } Observer.prototype = { constructor: Observer, observe: function observe(subject, topic, data) { try { if (this.org instanceof Ci.nsIObserver) this.org.observe(subject, topic, data); } catch (e) { Cu.reportError(e); } if (topic === 'xul-overlay-merged') setTimeout(next, 0); }, QueryInterface: function(iId) { if(iId.equals(Ci.nsISupports) || iId.equals(Ci.nsIObserver)) return this; throw Cr.NS_ERROR_NO_INTERFACE; }, }; function next() { loading = false; var args = queue.shift(); if (args) loadOverlay.apply(document, args); } function loadOverlay(url, observer) { if (loading) { queue.push([url, observer]); return; } loading = true; orgLoadOverlay.call(this, url, new Observer(observer)); } document.loadOverlay = loadOverlay; })();