diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 08b7a73b..4e84dec2 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -630,7 +630,6 @@ const Dactyl = Module("dactyl", { .toXMLString(), true); }, - /** * Opens the help page containing the specified topic if it * exists. @@ -824,7 +823,7 @@ const Dactyl = Module("dactyl", { break; } } - catch(e) {} + catch (e) {} // Unfortunately, failed page loads throw exceptions and // cause a lot of unwanted noise. This solution means that // any genuine errors go unreported. diff --git a/common/content/events.js b/common/content/events.js index 26607990..a8cc8ac5 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -746,7 +746,7 @@ const Events = Module("events", { return; } - if(isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) { + if (isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) { dactyl.mode = modes.EMBED; return; } @@ -1027,7 +1027,7 @@ const Events = Module("events", { onMouseDown: function (event) { let elem = event.target; 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; }, diff --git a/common/content/io.js b/common/content/io.js index efab3aa7..082904f9 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -67,7 +67,6 @@ const IO = Module("io", { services.get("downloadManager").addListener(this.downloadListener); }, - // 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 /** diff --git a/common/content/marks.js b/common/content/marks.js index 735210eb..ac99c9c5 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -17,10 +17,10 @@ const Marks = Module("marks", { this._urlMarks = storage.newMap("url-marks", { privateData: true, replacer: replacer, store: true }); try { - if(isArray(Iterator(this._localMarks).next()[1])) + if (isArray(Iterator(this._localMarks).next()[1])) this._localMarks.clear(); } - catch(e) {} + catch (e) {} this._pendingJumps = []; }, diff --git a/common/modules/base.jsm b/common/modules/base.jsm index ab421f3f..09cd9391 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -98,10 +98,10 @@ function defineModule(name, params) { module.NAME = name; module.EXPORTED_SYMBOLS = params.exports || []; defineModule.loadLog.push("defineModule " + name); - for(let [, mod] in Iterator(params.require || [])) + for (let [, mod] in Iterator(params.require || [])) require(module, mod); - for(let [, mod] in Iterator(params.use || [])) + for (let [, mod] in Iterator(params.use || [])) if (loaded.hasOwnProperty(mod)) require(module, mod, "use"); else { @@ -142,7 +142,7 @@ defineModule.time = function time(major, minor, func, self) { function endModule() { 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"); loaded[currentModule.NAME] = 1; } @@ -208,7 +208,7 @@ function debuggerProperties(obj) { * @returns {Generator} */ function prototype(obj) - obj.__proto__ || Object.getPrototypeOf(obj) || + obj.__proto__ || Object.getPrototypeOf(obj) || XPCNativeWrapper.unwrap(obj).__proto__ || Object.getPrototypeOf(XPCNativeWrapper.unwrap(obj)); function properties(obj, prototypes, debugger_) { @@ -1128,7 +1128,7 @@ const array = Class("array", Array, { */ zip: function zip(ary1, ary2) { let res = []; - for(let [i, item] in Iterator(ary1)) + for (let [i, item] in Iterator(ary1)) res.push([item, i in ary2 ? ary2[i] : ""]); return res; } diff --git a/common/modules/bookmarkcache.jsm b/common/modules/bookmarkcache.jsm index c4586d53..b2f3d621 100644 --- a/common/modules/bookmarkcache.jsm +++ b/common/modules/bookmarkcache.jsm @@ -10,7 +10,6 @@ defineModule("bookmarkcache", { require: ["services", "storage", "util"] }); - const Bookmark = Struct("url", "title", "icon", "keyword", "tags", "id"); const Keyword = Struct("keyword", "title", "icon", "url"); Bookmark.defaultValue("icon", function () BookmarkCache.getFavicon(this.url)); diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 17918e85..65683447 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -27,7 +27,7 @@ const Util = Module("Util", { dactyl: { __noSuchMethod__: function (meth, args) { let win = util.activeWindow; - if(win && win.dactyl) + if (win && win.dactyl) return win.dactyl[meth].apply(win.dactyl, args); return null; }