From ffba231f5637393b0125900ea989714ce5546a30 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 29 Jan 2011 20:36:48 -0500 Subject: Make :addons marginally functional on FF36. --- common/content/buffer.js | 9 +++++---- common/content/dactyl.js | 2 +- common/content/mappings.js | 2 +- common/content/tabs.js | 13 ++++++++----- 4 files changed, 15 insertions(+), 11 deletions(-) (limited to 'common/content') diff --git a/common/content/buffer.js b/common/content/buffer.js index 020d9bdd..1e6e8d95 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -314,13 +314,14 @@ var Buffer = Module("buffer", { statusline.updateUrl(); - if (webProgress.DOMWindow && uri) { - statusline.updateProgress(webProgress.DOMWindow); + let win = webProgress.DOMWindow; + if (win && uri) { + statusline.updateProgress(win); let oldURI = webProgress.document.dactylURI; if (webProgress.document.dactylLoadIdx === webProgress.loadedTransIndex || !oldURI || uri.spec.replace(/#.*/, "") !== oldURI.replace(/#.*/, "")) - for (let frame in values(buffer.allFrames(webProgress.DOMWindow))) + for (let frame in values(buffer.allFrames(win))) frame.document.dactylFocusAllowed = false; webProgress.document.dactylURI = uri.spec; webProgress.document.dactylLoadIdx = webProgress.loadedTransIndex; @@ -334,7 +335,7 @@ var Buffer = Module("buffer", { util.timeout(function () { buffer._triggerLoadAutocmd("LocationChange", - (webProgress.DOMWindow || content).document, + (win || content).document, uri); }); diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 4263e64b..879c745a 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -588,7 +588,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { * Initialize the help system. */ initHelp: function (force) { - if (!force && !this.helpInitialized) { + if (force || !this.helpInitialized) { if ("noscriptOverlay" in window) { noscriptOverlay.safeAllow("chrome-data:", true, false); noscriptOverlay.safeAllow("dactyl:", true, false); diff --git a/common/content/mappings.js b/common/content/mappings.js index 26edda35..7958dd4b 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -703,7 +703,7 @@ var Mappings = Module("mappings", { keepQuotes: true, options: [ { - names: ["-description", "-d"], + names: ["-description", "-desc", "-d"], description: "A description of this mapping group", type: CommandOption.STRING }, diff --git a/common/content/tabs.js b/common/content/tabs.js index 6766e388..49add59a 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -348,12 +348,15 @@ var Tabs = Module("tabs", { * reloading. */ reload: function (tab, bypassCache) { - if (bypassCache) { - const flags = Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY | Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE; - config.tabbrowser.getBrowserForTab(tab).reloadWithFlags(flags); + try { + if (bypassCache) { + const flags = Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY | Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE; + config.tabbrowser.getBrowserForTab(tab).reloadWithFlags(flags); + } + else + config.tabbrowser.reloadTab(tab); } - else - config.tabbrowser.reloadTab(tab); + catch (e if !(e instanceof Error)) {} }, /** -- cgit v1.2.3