1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 04:52:28 +01:00

Whitespace fixes.

This commit is contained in:
Doug Kearns
2010-10-09 21:45:52 +11:00
parent 86efd0bb6a
commit 8be0558982
7 changed files with 11 additions and 14 deletions

View File

@@ -630,7 +630,6 @@ const Dactyl = Module("dactyl", {
</item></>.toXMLString(), true); </item></>.toXMLString(), true);
}, },
/** /**
* Opens the help page containing the specified <b>topic</b> if it * Opens the help page containing the specified <b>topic</b> if it
* exists. * exists.
@@ -824,7 +823,7 @@ const Dactyl = Module("dactyl", {
break; break;
} }
} }
catch(e) {} catch (e) {}
// Unfortunately, failed page loads throw exceptions and // Unfortunately, failed page loads throw exceptions and
// cause a lot of unwanted noise. This solution means that // cause a lot of unwanted noise. This solution means that
// any genuine errors go unreported. // any genuine errors go unreported.

View File

@@ -746,7 +746,7 @@ const Events = Module("events", {
return; return;
} }
if(isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) { if (isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) {
dactyl.mode = modes.EMBED; dactyl.mode = modes.EMBED;
return; return;
} }
@@ -1027,7 +1027,7 @@ const Events = Module("events", {
onMouseDown: function (event) { onMouseDown: function (event) {
let elem = event.target; let elem = event.target;
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem; let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
for(; win; win = win != win.parent && win.parent) for (; win; win = win != win.parent && win.parent)
win.dactylFocusAllowed = true; win.dactylFocusAllowed = true;
}, },

View File

@@ -67,7 +67,6 @@ const IO = Module("io", {
services.get("downloadManager").addListener(this.downloadListener); services.get("downloadManager").addListener(this.downloadListener);
}, },
// TODO: there seems to be no way, short of a new component, to change // TODO: there seems to be no way, short of a new component, to change
// the process's CWD - see https://bugzilla.mozilla.org/show_bug.cgi?id=280953 // the process's CWD - see https://bugzilla.mozilla.org/show_bug.cgi?id=280953
/** /**

View File

@@ -17,10 +17,10 @@ const Marks = Module("marks", {
this._urlMarks = storage.newMap("url-marks", { privateData: true, replacer: replacer, store: true }); this._urlMarks = storage.newMap("url-marks", { privateData: true, replacer: replacer, store: true });
try { try {
if(isArray(Iterator(this._localMarks).next()[1])) if (isArray(Iterator(this._localMarks).next()[1]))
this._localMarks.clear(); this._localMarks.clear();
} }
catch(e) {} catch (e) {}
this._pendingJumps = []; this._pendingJumps = [];
}, },

View File

@@ -98,10 +98,10 @@ function defineModule(name, params) {
module.NAME = name; module.NAME = name;
module.EXPORTED_SYMBOLS = params.exports || []; module.EXPORTED_SYMBOLS = params.exports || [];
defineModule.loadLog.push("defineModule " + name); defineModule.loadLog.push("defineModule " + name);
for(let [, mod] in Iterator(params.require || [])) for (let [, mod] in Iterator(params.require || []))
require(module, mod); require(module, mod);
for(let [, mod] in Iterator(params.use || [])) for (let [, mod] in Iterator(params.use || []))
if (loaded.hasOwnProperty(mod)) if (loaded.hasOwnProperty(mod))
require(module, mod, "use"); require(module, mod, "use");
else { else {
@@ -142,7 +142,7 @@ defineModule.time = function time(major, minor, func, self) {
function endModule() { function endModule() {
defineModule.loadLog.push("endModule " + currentModule.NAME); defineModule.loadLog.push("endModule " + currentModule.NAME);
for(let [, mod] in Iterator(use[currentModule.NAME] || [])) for (let [, mod] in Iterator(use[currentModule.NAME] || []))
require(mod, currentModule.NAME, "use"); require(mod, currentModule.NAME, "use");
loaded[currentModule.NAME] = 1; loaded[currentModule.NAME] = 1;
} }
@@ -1128,7 +1128,7 @@ const array = Class("array", Array, {
*/ */
zip: function zip(ary1, ary2) { zip: function zip(ary1, ary2) {
let res = []; let res = [];
for(let [i, item] in Iterator(ary1)) for (let [i, item] in Iterator(ary1))
res.push([item, i in ary2 ? ary2[i] : ""]); res.push([item, i in ary2 ? ary2[i] : ""]);
return res; return res;
} }

View File

@@ -10,7 +10,6 @@ defineModule("bookmarkcache", {
require: ["services", "storage", "util"] require: ["services", "storage", "util"]
}); });
const Bookmark = Struct("url", "title", "icon", "keyword", "tags", "id"); const Bookmark = Struct("url", "title", "icon", "keyword", "tags", "id");
const Keyword = Struct("keyword", "title", "icon", "url"); const Keyword = Struct("keyword", "title", "icon", "url");
Bookmark.defaultValue("icon", function () BookmarkCache.getFavicon(this.url)); Bookmark.defaultValue("icon", function () BookmarkCache.getFavicon(this.url));

View File

@@ -27,7 +27,7 @@ const Util = Module("Util", {
dactyl: { dactyl: {
__noSuchMethod__: function (meth, args) { __noSuchMethod__: function (meth, args) {
let win = util.activeWindow; let win = util.activeWindow;
if(win && win.dactyl) if (win && win.dactyl)
return win.dactyl[meth].apply(win.dactyl, args); return win.dactyl[meth].apply(win.dactyl, args);
return null; return null;
} }