mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-15 22:55:46 +01:00
Make :addons marginally functional on FF36.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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)) {}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user