1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 21:34:13 +01:00

Some minor cleanup and fixes.

This commit is contained in:
Kris Maglione
2010-12-09 20:46:35 -05:00
parent a0335cb437
commit e339032fd2
7 changed files with 92 additions and 58 deletions

View File

@@ -282,18 +282,16 @@ const Buffer = Module("buffer", {
statusline.updateProgress(curTotalProgress/maxTotalProgress);
},
// happens when the users switches tabs
onLocationChange: function onLocationChange() {
onLocationChange: function onLocationChange(webProgress, request, uri) {
onLocationChange.superapply(this, arguments);
statusline.updateUrl();
statusline.updateProgress();
for (let frame in values(buffer.allFrames()))
frame.dactylFocusAllowed = false;
let browser = config.browser.mCurrentBrowser;
let uri = browser.registeredOpenURI || browser.lastURI;
if (uri.scheme === "dactyl" && !(browser.contentDocument || {}).pageIsFullyLoaded)
if (uri.scheme === "dactyl" && webProgress.isLoadingDocument)
// Workaround for bugs 591425 and 606877, dactyl bug #81
browser.collapsed = true;
config.browser.mCurrentBrowser.collapsed = true;
util.timeout(function () {
autocommands.trigger("LocationChange", { url: buffer.URL });

View File

@@ -52,6 +52,7 @@
let prefix = [BASE];
modules.load("util");
modules.load("services");
prefix.unshift("chrome://" + modules.services["dactyl:"].name + "/content/");
@@ -59,7 +60,6 @@
"modules",
"prefs",
"storage",
"util",
"javascript",
"dactyl",
"modes",

View File

@@ -432,7 +432,7 @@ const Tabs = Module("tabs", {
if (matches)
return tabs.select(this.allTabs[parseInt(matches[1], 10) - 1], false);
matches = array.nth(tabs.allTabs, function (t) t.linkedBrowser.lastURI.spec === buffer, 0);
matches = array.nth(tabs.allTabs, function (t) (t.linkedBrowser.lastURI || {}).spec === buffer, 0);
if (matches)
return tabs.select(matches, false);