diff --git a/common/bootstrap.js b/common/bootstrap.js index d0dd98a8..d131a2b5 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -103,7 +103,7 @@ let JSMLoader = { return resourceProto.resolveURI(uri); let chan = Services.io.newChannelFromURI(uri); - try { chan.cancel(Cr.NS_BINDING_ABORTED) } catch (e) {} + try { chan.cancel(Cr.NS_BINDING_ABORTED); } catch (e) {} return chan.name; }, diff --git a/common/components/commandline-handler.js b/common/components/commandline-handler.js index 0be89de6..481cbcde 100644 --- a/common/components/commandline-handler.js +++ b/common/components/commandline-handler.js @@ -91,4 +91,4 @@ else var NSGetModule = XPCOMUtils.generateNSGetModule([CommandLineHandler]); var EXPORTED_SYMBOLS = ["NSGetFactory", "global"]; -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/abbreviations.js b/common/content/abbreviations.js index 4b646446..29908475 100644 --- a/common/content/abbreviations.js +++ b/common/content/abbreviations.js @@ -380,4 +380,4 @@ var Abbreviations = Module("abbreviations", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/autocommands.js b/common/content/autocommands.js index b1419028..59013b12 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -122,7 +122,7 @@ var AutoCommands = Module("autocommands", { ["td", {}, item.filter.toJSONXML ? item.filter.toJSONXML(modules) : String(item.filter)], ["td", {}, String(item.command)]]), ["tr", { style: "height: .5ex;" }]]).toArray(), - ["tr", { style: "height: .5ex;" }], + ["tr", { style: "height: .5ex;" }] ])]); commandline.commandOutput(table); }, @@ -296,4 +296,4 @@ var AutoCommands = Module("autocommands", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index 21b4f4cd..d92c6247 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -730,4 +730,4 @@ var Bookmarks = Module("bookmarks", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/browser.js b/common/content/browser.js index 331b1464..79d98d2d 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -222,7 +222,7 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), if (dactyl.forceTarget in openModes) mode = openModes[dactyl.forceTarget]; - CommandExMode().open(mode + "open " + (args || "")) + CommandExMode().open(mode + "open " + (args || "")); } function decode(uri) util.losslessDecodeURI(uri) @@ -282,4 +282,4 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/commandline.js b/common/content/commandline.js index 1942285c..735423f6 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -54,7 +54,7 @@ var CommandWidgets = Class("CommandWidgets", { ["vbox", { id: "dactyl-completions-" + s + "commandline-container", class: "dactyl-container", hidden: "false", collapsed: "true" }, ["iframe", { class: "dactyl-completions", id: "dactyl-completions-" + s + "commandline", src: "dactyl://content/buffer.xhtml", contextmenu: "dactyl-contextmenu", flex: "1", hidden: "false", collapsed: "false", highlight: "Events", - events: "mowEvents" }]]]], + events: "mowEvents" }]]]] }); this.elements = {}; @@ -634,7 +634,7 @@ var CommandLine = Module("commandline", { node.completionList = ItemList(elem); node.completionList.isAboveMow = node.id == - this.widgets.statusbar.commandline.id + this.widgets.statusbar.commandline.id; } return node.completionList; }, @@ -741,7 +741,7 @@ var CommandLine = Module("commandline", { if (val) this.widgets["message-pre"] = _("commandline.moreMessages", val) + " "; else - this.widgets["message-pre"] = null + this.widgets["message-pre"] = null; }, _lastEcho: null, @@ -1013,7 +1013,7 @@ var CommandLine = Module("commandline", { this.store = this.store.filter(function (line) (line.value || line) != str); dactyl.trapErrors(function () { - this.store.push({ value: str, timestamp: Date.now()*1000, privateData: privateData }); + this.store.push({ value: str, timestamp: Date.now() * 1000, privateData: privateData }); }, this); this.store = this.store.slice(Math.max(0, this.store.length - options["history"])); }, @@ -1768,7 +1768,7 @@ var CommandLine = Module("commandline", { }); let bind = function bind() - mappings.add.apply(mappings, [[modes.COMMAND_LINE]].concat(Array.slice(arguments))) + mappings.add.apply(mappings, [[modes.COMMAND_LINE]].concat(Array.slice(arguments))); bind(["", ""], "Stop waiting for completions or exit Command Line mode", function ({ self }) { @@ -2030,7 +2030,7 @@ var ItemList = Class("ItemList", { if (start < 0 || start >= this.itemCount) return null; - group = array.nth(groups, function (g) let (i = start - g.offsets.start) i >= 0 && i < g.itemCount, 0) + group = array.nth(groups, function (g) let (i = start - g.offsets.start) i >= 0 && i < g.itemCount, 0); return [group.context, start - group.offsets.start]; }, @@ -2342,7 +2342,7 @@ var ItemList = Class("ItemList", { container.scrollTop = scroll; if (scrollY != null) win.scrollTo(0, Math.max(scrollY, 0)); - } + }; }, /** @@ -2455,4 +2455,4 @@ var ItemList = Class("ItemList", { }) }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/dactyl.js b/common/content/dactyl.js index f44efde9..e96b39e7 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -83,7 +83,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { } }, - observers: { "dactyl-cleanup": function dactyl_cleanup(subject, reason) { let modules = dactyl.modules; @@ -682,7 +681,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { tag = function (map) [ let (c = obj.modes[0].char) c ? c + "_" : "", map - ] + ]; link = function (map) { let [, mode, name, extra] = /^(?:(.)_)?(?:<([^>]+)>)?(.*)$/.exec(map); let k = ["k", {}, extra]; @@ -710,7 +709,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { let description = ["description", {}, obj.description ? ["p", {}, template.linkifyHelp(obj.description.replace(/\.?$/, "."), true)] : "", extraHelp ? extraHelp : "", - !(extraHelp || obj.description) ? ["p", {}, /*L*/ "Sorry, no help available."] : ""] + !(extraHelp || obj.description) ? ["p", {}, /*L*/ "Sorry, no help available."] : ""]; res.push( ["item", {}, @@ -1200,7 +1199,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { dactyl.reportError(e, true); } }); - } + }; }, /** @@ -1829,7 +1828,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { commandline.commandOutput([ ["div", {}, [config.appName, " ", config.version, date, " running on: "].join("")], ["div", {}, [window.navigator.userAgent].join("")] - ]) + ]); } }, { argCount: "0", @@ -2003,4 +2002,4 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/disable-acr.jsm b/common/content/disable-acr.jsm index 5f5b4fea..86e55c4a 100644 --- a/common/content/disable-acr.jsm +++ b/common/content/disable-acr.jsm @@ -64,7 +64,7 @@ function chromeDocuments() { Ci.nsIDocShell.ENUMERATE_FORWARDS); while (docShells.hasMoreElements()) try { - yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument; + yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument; } catch (e) {} } @@ -73,4 +73,4 @@ function chromeDocuments() { var EXPORTED_SYMBOLS = ["cleanup", "init"]; -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/content/editor.js b/common/content/editor.js index eef3c1de..730a19af 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -870,7 +870,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { function addBeginInsertModeMap(keys, commands, description) { mappings.add([modes.TEXT_EDIT], keys, description || "", function () { - commands.forEach(function (cmd) { editor.executeCommand(cmd, 1) }); + commands.forEach(function (cmd) { editor.executeCommand(cmd, 1); }); modes.push(modes.INSERT); }, { type: "editor" }); @@ -1148,13 +1148,12 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { mappings.add([modes.TEXT_EDIT], names, description, action, update({ type: "editor" }, params)); - bind([""], "Increment the next number", - function ({ count }) { editor.modifyNumber(count || 1) }, + function ({ count }) { editor.modifyNumber(count || 1); }, { count: true }); bind([""], "Decrement the next number", - function ({ count }) { editor.modifyNumber(-(count || 1)) }, + function ({ count }) { editor.modifyNumber(-(count || 1)); }, { count: true }); // text edit mode @@ -1326,7 +1325,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { { count: true }); let bind = function bind() mappings.add.apply(mappings, - [[modes.AUTOCOMPLETE]].concat(Array.slice(arguments))) + [[modes.AUTOCOMPLETE]].concat(Array.slice(arguments))); bind([""], "Return to Insert mode", function () Events.PASS_THROUGH); @@ -1407,4 +1406,4 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/eval.js b/common/content/eval.js index 9e10d9f5..5ef09519 100644 --- a/common/content/eval.js +++ b/common/content/eval.js @@ -9,4 +9,4 @@ catch (e) { __dactyl_eval_error = e; } // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/events.js b/common/content/events.js index 253e9676..ffa279bb 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -970,7 +970,7 @@ var Events = Module("events", { return DOM(elem).isEditable || isinstance(elem, [Ci.nsIDOMHTMLEmbedElement, Ci.nsIDOMHTMLObjectElement, - Ci.nsIDOMHTMLSelectElement]) + Ci.nsIDOMHTMLSelectElement]); }, kill: function kill(event) { @@ -1172,4 +1172,4 @@ var Events = Module("events", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/help.js b/common/content/help.js index 70c37533..1d921fac 100644 --- a/common/content/help.js +++ b/common/content/help.js @@ -24,4 +24,4 @@ function checkFragment() { document.addEventListener("load", checkFragment, true); document.addEventListener("hashChange", checkFragment, true); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/hints.js b/common/content/hints.js index abadef48..d151c2c3 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -1352,7 +1352,7 @@ var Hints = Module("hints", { { values: { "0": "Follow the first hint as soon as typed text uniquely identifies it. Follow the selected hint on .", - "1": "Follow the selected hint on .", + "1": "Follow the selected hint on ." } }); @@ -1389,4 +1389,4 @@ var Hints = Module("hints", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/history.js b/common/content/history.js index c69237f1..9f2a2d95 100644 --- a/common/content/history.js +++ b/common/content/history.js @@ -61,12 +61,12 @@ var History = Module("history", { }, get session() { - let webNav = window.getWebNavigation() + let webNav = window.getWebNavigation(); let sh = webNav.sessionHistory; let obj = []; obj.__defineGetter__("index", function () sh.index); - obj.__defineSetter__("index", function (val) { webNav.gotoIndex(val) }); + obj.__defineSetter__("index", function (val) { webNav.gotoIndex(val); }); obj.__iterator__ = function () array.iterItems(this); for (let item in iter(sh.SHistoryEnumerator, Ci.nsIHistoryEntry)) @@ -371,13 +371,13 @@ var History = Module("history", { { count: true }); bind(["[d"], "Go back to the previous domain in the browser history", - function ({ count }) { history.search("domain", -Math.max(count, 1)) }, + function ({ count }) { history.search("domain", -Math.max(count, 1)); }, { count: true }); bind(["]d"], "Go forward to the next domain in the browser history", - function ({ count }) { history.search("domain", Math.max(count, 1)) }, + function ({ count }) { history.search("domain", Math.max(count, 1)); }, { count: true }); } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/key-processors.js b/common/content/key-processors.js index aa1e016d..285b345f 100644 --- a/common/content/key-processors.js +++ b/common/content/key-processors.js @@ -322,3 +322,4 @@ var KeyArgProcessor = Class("KeyArgProcessor", KeyProcessor, { } }); +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/mappings.js b/common/content/mappings.js index c272eb5f..caa1a39a 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -496,7 +496,7 @@ var Mappings = Module("mappings", { ["td", {}, modeSign], ["td", {}, name], ["td", {}, map.rhs || map.action.toSource()]])), - ["tr", { style: "height: .5ex;" }]])] + ["tr", { style: "height: .5ex;" }]])]; // E4X-FIXME // // TODO: Move this to an ItemList to show this automatically @@ -572,7 +572,7 @@ var Mappings = Module("mappings", { options: [ { names: ["-arg", "-a"], - description: "Accept an argument after the requisite key press", + description: "Accept an argument after the requisite key press" }, { names: ["-builtin", "-b"], @@ -828,8 +828,8 @@ var Mappings = Module("mappings", { mappings: function initMappings(dactyl, modules, window) { mappings.add([modes.COMMAND], ["\\"], "Emits pseudo-key", - function () { events.feedkeys("") }); + function () { events.feedkeys(""); }); } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/marks.js b/common/content/marks.js index 4776c1ce..8131e296 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -233,7 +233,7 @@ var Marks = Module("marks", { _scrollTo: function _scrollTo(mark) { if (!mark.path) - var node = buffer.findScrollable(0, (mark.offset || mark.position).x) + var node = buffer.findScrollable(0, (mark.offset || mark.position).x); else for (node in DOM.XPath(mark.path, buffer.focusedFrame.document)) break; @@ -303,7 +303,6 @@ var Marks = Module("marks", { Math.round(mark.position.y * 100) + "%)", (tab && "tab: " + tabs.index(tab)) ].filter(util.identity).join(", "); - }, isLocalMark: bind("test", /^[a-z`']$/), @@ -408,4 +407,4 @@ var Marks = Module("marks", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/modes.js b/common/content/modes.js index 2df79d9c..fc33fd7f 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -606,7 +606,7 @@ var Modes = Module("modes", { }, setter: function (vals) { - modes.all.forEach(function (m) { delete m.passUnknown }); + modes.all.forEach(function (m) { delete m.passUnknown; }); vals = vals.map(function (v) update(new String(v.toLowerCase()), { mode: v.replace(/^!/, "").toUpperCase(), @@ -634,8 +634,8 @@ var Modes = Module("modes", { }, prefs: function initPrefs() { prefs.watch("accessibility.browsewithcaret", - function () { modes.onCaretChange.apply(modes, arguments) }); + function () { modes.onCaretChange.apply(modes, arguments); }); } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/mow.js b/common/content/mow.js index b87c7fe9..6ef53f8f 100644 --- a/common/content/mow.js +++ b/common/content/mow.js @@ -399,4 +399,4 @@ var MOW = Module("mow", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/quickmarks.js b/common/content/quickmarks.js index 9fc5acae..f2c10399 100644 --- a/common/content/quickmarks.js +++ b/common/content/quickmarks.js @@ -204,4 +204,4 @@ var QuickMarks = Module("quickmarks", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/statusline.js b/common/content/statusline.js index 0de02088..4cf50c47 100644 --- a/common/content/statusline.js +++ b/common/content/statusline.js @@ -269,7 +269,7 @@ var StatusLine = Module("statusline", { }); }, - updateUrl: deprecated("statusline.status", function updateUrl(url) { this.status = url || buffer.uri }), + updateUrl: deprecated("statusline.status", function updateUrl(url) { this.status = url || buffer.uri; }), /** * Set the contents of the status line's input buffer to the given @@ -393,4 +393,4 @@ var StatusLine = Module("statusline", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/content/tabs.js b/common/content/tabs.js index fb155db8..016355fa 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -237,7 +237,7 @@ var Tabs = Module("tabs", { return this._groups; if (func) - func = bind(function (func) { func(this._groups) }, this, func); + func = bind(function (func) { func(this._groups); }, this, func); if (window.TabView && window.TabView._initFrame) window.TabView._initFrame(func); @@ -335,7 +335,6 @@ var Tabs = Module("tabs", { completion.listCompleter("buffer", filter); }, - /** * Return an iterator of tabs matching the given filter. If no * *filter* or *count* is provided, returns the currently selected @@ -1312,4 +1311,4 @@ var Tabs = Module("tabs", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/common/locale/en-US/autocommands.xml b/common/locale/en-US/autocommands.xml index 6cb779be..d5e3fa14 100644 --- a/common/locale/en-US/autocommands.xml +++ b/common/locale/en-US/autocommands.xml @@ -40,10 +40,10 @@

- If the -group=group flag is given, add this autocmd - to the named group. Any filters for group apply in - addition to filter. When listing commands this limits the - output to the specified group. + If the -group=group flag is given, add this + autocommand to the named group. Any filters for group + apply in addition to filter. When listing commands this + limits the output to the specified group.

Available events:

diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm index 9ff13af9..dbba054c 100644 --- a/common/modules/addons.jsm +++ b/common/modules/addons.jsm @@ -25,7 +25,7 @@ var listener = function listener(action, event) this.dactyl[install.error ? "echoerr" : "echomsg"]( _("addon.error", action, event, (install.name || install.sourceURI.spec) + (install.error ? ": " + addons.errors[install.error] : ""))); - } + }; var AddonListener = Class("AddonListener", { init: function init(modules) { @@ -120,7 +120,7 @@ var actions = { }, get filter() { return function (addon) !addon.userDisabled && - !(addon.operationsRequiringRestart & (AddonManager.OP_NEEDS_RESTART_ENABLE | AddonManager.OP_NEEDS_RESTART_DISABLE)) + !(addon.operationsRequiringRestart & (AddonManager.OP_NEEDS_RESTART_ENABLE | AddonManager.OP_NEEDS_RESTART_DISABLE)); }, perm: "disable" }, @@ -206,7 +206,7 @@ var Addon = Class("Addon", { ["span", { highlight: pending[0] }, pending[1]], " on ", ["a", { href: "#", "dactyl:command": "dactyl.restart" }, "restart"], - ")"] + ")"]; return info; }, @@ -498,4 +498,4 @@ endModule(); } catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/base.jsm b/common/modules/base.jsm index 589c8042..ab6421d9 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -241,7 +241,7 @@ function properties(obj, prototypes, debugger_) { return array.uniq([k for (k in obj)].concat( Object.getOwnPropertyNames( XPCNativeWrapper.unwrap(obj)) - .filter(filter))) + .filter(filter))); } else if (!e.stack) { throw Error(e); @@ -1080,7 +1080,7 @@ function XPCOMShim(interfaces) { getInterfaces: function (count) { count.value = 0; } }); return (interfaces || []).reduce(function (shim, iface) shim.QueryInterface(Ci[iface]), - ip.data) + ip.data); }; let stub = Class.Property({ configurable: true, @@ -1097,7 +1097,7 @@ var ErrorBase = Class("ErrorBase", Error, { init: function EB_init(message, level) { level = level || 0; let error = Error(message); - update(this, error) + update(this, error); this.stack = error.stack; this.message = message; @@ -1172,7 +1172,7 @@ Module.INIT = { module.isLocalModule = true; modules.jsmodules[this.constructor.className] = module; - locals.reverse().forEach(function (fn, i) update(objs[i], fn.apply(module, args))) + locals.reverse().forEach(function (fn, i) update(objs[i], fn.apply(module, args))); memoize(module, "closure", Class.makeClosure); module.instance = module; @@ -1769,4 +1769,4 @@ endModule(); // catch(e){dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack);} -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/bookmarkcache.jsm b/common/modules/bookmarkcache.jsm index cedf7bd9..be55f981 100644 --- a/common/modules/bookmarkcache.jsm +++ b/common/modules/bookmarkcache.jsm @@ -262,4 +262,4 @@ var BookmarkCache = Module("BookmarkCache", XPCOM(Ci.nsINavBookmarkObserver), { endModule(); -// vim: set fdm=marker sw=4 sts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/bootstrap.jsm b/common/modules/bootstrap.jsm index 6c9426d2..4206133a 100644 --- a/common/modules/bootstrap.jsm +++ b/common/modules/bootstrap.jsm @@ -19,3 +19,4 @@ this["import"] = function import_(obj) { Components.utils.import("resource://gre/modules/Services.jsm"); function loadSubScript() Services.scriptloader.loadSubScript.apply(null, arguments); +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index 5c812b38..7df2544f 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -33,7 +33,7 @@ var Buffer = Module("Buffer", { let win = services.focus.focusedWindow; if (!win || win == window || util.topWindow(win) != window) - return window.content + return window.content; if (win.top == window) return win; return win.top; @@ -219,7 +219,7 @@ var Buffer = Module("Buffer", { */ get zoomLevel() { let v = this.contentViewer; - return v[v.textZoom == 1 ? "fullZoom" : "textZoom"] * 100 + return v[v.textZoom == 1 ? "fullZoom" : "textZoom"] * 100; }, set zoomLevel(value) { this.setZoom(value, this.fullZoom); }, @@ -907,7 +907,7 @@ var Buffer = Module("Buffer", { let distance = reverse ? function (rect) -rect.top : function (rect) rect.top; let elems = [[e, distance(e.getBoundingClientRect())] for (e in path.matcher(this.focusedFrame.document))] .filter(function (e) e[1] > FUDGE) - .sort(function (a, b) a[1] - b[1]) + .sort(function (a, b) a[1] - b[1]); if (offScreen && !reverse) elems = elems.filter(function (e) e[1] > this, this.topWindow.innerHeight); @@ -1368,10 +1368,10 @@ var Buffer = Module("Buffer", { get scrollRightMax() this.win.scrollMaxY, get scrollLeft() this.win.scrollX, - set scrollLeft(val) { this.win.scrollTo(val, this.win.scrollY) }, + set scrollLeft(val) { this.win.scrollTo(val, this.win.scrollY); }, get scrollTop() this.win.scrollY, - set scrollTop(val) { this.win.scrollTo(this.win.scrollX, val) } + set scrollTop(val) { this.win.scrollTo(this.win.scrollX, val); } }; return elem; }, @@ -1680,7 +1680,7 @@ var Buffer = Module("Buffer", { return { x: elem.scrollLeft && elem.scrollLeft / this._exWidth(node), y: elem.scrollTop / parseFloat(style.lineHeight) - } + }; }, _exWidth: function _exWidth(elem) { @@ -1747,7 +1747,7 @@ var Buffer = Module("Buffer", { const BRANCH = "printer_" + PRINTER + "."; const BRANCHES = ["print.", BRANCH, "print." + BRANCH]; function set(pref, value) { - BRANCHES.forEach(function (branch) { prefs.set(branch + pref, value) }); + BRANCHES.forEach(function (branch) { prefs.set(branch + pref, value); }); } prefs.withContext(function () { @@ -2665,7 +2665,7 @@ Buffer.addPageInfoSection("m", "Meta Tags", function (verbose) { }); Buffer.addPageInfoSection("s", "Security", function (verbose) { - let { statusline } = this.modules + let { statusline } = this.modules; let identity = this.topWindow.gIdentityHandler; @@ -2706,4 +2706,4 @@ Buffer.addPageInfoSection("s", "Security", function (verbose) { endModule(); -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/cache.jsm b/common/modules/cache.jsm index 5f39bc6a..e25bd426 100644 --- a/common/modules/cache.jsm +++ b/common/modules/cache.jsm @@ -28,7 +28,7 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), { "cache": function (uri, path) { let contentType = "text/plain"; try { - contentType = services.mime.getTypeFromURI(uri) + contentType = services.mime.getTypeFromURI(uri); } catch (e) {} @@ -268,4 +268,4 @@ endModule(); // catch(e){ if (typeof e === "string") e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 sts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index 199cfff1..63d3c6a3 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -352,7 +352,7 @@ var Command = Class("Command", { { configurable: true, enumerable: true, get: function () opt.default }; if (prop.get && !prop.set) - prop.set = function (val) { Class.replaceProperty(this, opt.names[0], val) }; + prop.set = function (val) { Class.replaceProperty(this, opt.names[0], val); }; Object.defineProperty(res, opt.names[0], prop); } }); @@ -536,7 +536,7 @@ var CommandHive = Class("CommandHive", Contexts.Hive, { if (this.cached) this.modules.initDependencies("commands"); this.cached = false; - return array.iterValues(this._list.sort(function (a, b) a.name > b.name)) + return array.iterValues(this._list.sort(function (a, b) a.name > b.name)); }, /** @property {string} The last executed Ex command line. */ @@ -1171,7 +1171,7 @@ var Commands = Module("commands", { if (sub.substr(0, 2) === "<<" && hereDoc) let ([count, arg] = getNextArg(sub)) { sub = arg + sub.substr(count); - } + }; args.push(sub); args.quote = null; @@ -1787,7 +1787,7 @@ let quote = function quote(q, list, map) { Commands.quoteMap = { "\n": "\\n", - "\t": "\\t", + "\t": "\\t" }; Commands.quoteArg = { @@ -1813,4 +1813,4 @@ endModule(); } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/completion.jsm b/common/modules/completion.jsm index eec3857b..869a7c00 100644 --- a/common/modules/completion.jsm +++ b/common/modules/completion.jsm @@ -943,7 +943,7 @@ var Completion = Module("completion", { template.map(contexts, function m(context) [template.completionRow(context.title, "CompTitle"), template.map(context.items, function m(item) context.createRow(item), null, 100)])]); - }, + } }), //////////////////////////////////////////////////////////////////////////////// @@ -1019,7 +1019,7 @@ var Completion = Module("completion", { let words = context.filter.toLowerCase().split(/\s+/g); context.hasItems = true; context.completions = context.completions.filter(function f({ url, title }) - words.every(function e(w) (url + " " + title).toLowerCase().indexOf(w) >= 0)) + words.every(function e(w) (url + " " + title).toLowerCase().indexOf(w) >= 0)); context.format = this.modules.bookmarks.format; context.keys.extra = function k_extra(item) { @@ -1229,4 +1229,4 @@ endModule(); // catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/config.jsm b/common/modules/config.jsm index 305880d3..574f788f 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -37,7 +37,7 @@ AboutHandler.prototype = { return channel; }, - getURIFlags: function (uri) Ci.nsIAboutModule.ALLOW_SCRIPT, + getURIFlags: function (uri) Ci.nsIAboutModule.ALLOW_SCRIPT }; var ConfigBase = Class("ConfigBase", { /** @@ -415,7 +415,7 @@ var ConfigBase = Class("ConfigBase", { "list.href": Class.Memoize(function () "http://groups.google.com/group/" + config.name), "hg.latest": Class.Memoize(function () this.code + "source/browse/"), // XXX - "irc": "irc://irc.oftc.net/#pentadactyl", + "irc": "irc://irc.oftc.net/#pentadactyl" }), dtdExtra: { @@ -494,7 +494,7 @@ var ConfigBase = Class("ConfigBase", { */ get outputHeight() this.browser.mPanelContainer.boxObject.height, - tabStrip: Class.Memoize(function () document.getElementById("TabsToolbar") || this.tabbrowser.mTabContainer), + tabStrip: Class.Memoize(function () document.getElementById("TabsToolbar") || this.tabbrowser.mTabContainer) }), /** @@ -620,4 +620,4 @@ endModule(); // catch(e){ if (typeof e === "string") e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 sts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index c34d2dde..3a722b36 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -819,4 +819,4 @@ endModule(); // catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/dom-e4x.jsm b/common/modules/dom-e4x.jsm index 5a1cdfb6..c83810bb 100644 --- a/common/modules/dom-e4x.jsm +++ b/common/modules/dom-e4x.jsm @@ -51,3 +51,4 @@ function fromXML(node, doc, nodes) { } } +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index 9bba185d..b76bc0fe 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -100,7 +100,7 @@ var DOM = Class("DOM", { href: { get: function (elem) elem.href || elem.getAttribute("href") }, src: { get: function (elem) elem.src || elem.getAttribute("src") }, checked: { get: function (elem) elem.hasAttribute("checked") ? elem.getAttribute("checked") == "true" : elem.checked, - set: function (elem, val) { elem.setAttribute("checked", !!val); elem.checked = val } }, + set: function (elem, val) { elem.setAttribute("checked", !!val); elem.checked = val; } }, collapsed: BooleanAttribute("collapsed"), disabled: BooleanAttribute("disabled"), hidden: BooleanAttribute("hidden"), @@ -193,8 +193,8 @@ var DOM = Class("DOM", { let res = this.Empty(); this.each(function (elem) { - while(true) { - elem = fn.call(this, elem) + while (true) { + elem = fn.call(this, elem); if (elem instanceof Ci.nsIDOMNode) res[res.length++] = elem; else if (elem && "length" in elem) @@ -272,7 +272,7 @@ var DOM = Class("DOM", { each: function each(meth, arg) { return self.each(function (elem) { elem.classList[meth](arg); - }) + }); }, add: function add(cls) this.each("add", cls), @@ -312,7 +312,7 @@ var DOM = Class("DOM", { let { highlight } = this; let v = callable(val) ? val.call(thisObj || this, elem, i) : val; - highlight[(v == null ? highlight.has(hl) : !v) ? "remove" : "add"](hl) + highlight[(v == null ? highlight.has(hl) : !v) ? "remove" : "add"](hl); }), }), @@ -346,7 +346,7 @@ var DOM = Class("DOM", { get bottom() this.top + this.height, left: r.left + node.clientLeft, get right() this.left + this.width - } + }; }, scrollPos: function scrollPos(left, top) { @@ -578,7 +578,7 @@ var DOM = Class("DOM", { let res = []; this.each(function (elem) { try { - let hasChildren = elem.firstChild && (!/^\s*$/.test(elem.firstChild) || elem.firstChild.nextSibling) + let hasChildren = elem.firstChild && (!/^\s*$/.test(elem.firstChild) || elem.firstChild.nextSibling); if (color) res.push(["span", { highlight: "HelpXML" }, ["span", { highlight: "HelpXMLTagStart" }, @@ -593,7 +593,7 @@ var DOM = Class("DOM", { ], !hasChildren ? "" : ["", "...", - ["span", { highlight: "HtmlTagEnd" },"<", namespaced(elem), ">"]] + ["span", { highlight: "HtmlTagEnd" }, "<", namespaced(elem), ">"]] ]); else { let tag = "<" + [namespaced(elem)].concat( @@ -794,19 +794,19 @@ var DOM = Class("DOM", { html: function html(txt, self) { return this.getSet(arguments, function (elem) elem.innerHTML, - util.wrapCallback(function (elem, val) { elem.innerHTML = val })); + util.wrapCallback(function (elem, val) { elem.innerHTML = val; })); }, text: function text(txt, self) { return this.getSet(arguments, function (elem) elem.textContent, - function (elem, val) { elem.textContent = val }); + function (elem, val) { elem.textContent = val; }); }, val: function val(txt) { return this.getSet(arguments, function (elem) elem.value, - function (elem, val) { elem.value = val == null ? "" : val }); + function (elem, val) { elem.value = val == null ? "" : val; }); }, listen: function listen(event, listener, capture) { @@ -905,7 +905,7 @@ var DOM = Class("DOM", { return true; if (rect.top > viewport.bottom) return false; - return Math.abs(rect.top) < Math.abs(viewport.bottom - rect.bottom) + return Math.abs(rect.top) < Math.abs(viewport.bottom - rect.bottom); } let rect; @@ -1066,7 +1066,6 @@ var DOM = Class("DOM", { return this; }, - code_key: Class.Memoize(function (prop) this.init()[prop]), code_nativeKey: Class.Memoize(function (prop) this.init()[prop]), keyTable: Class.Memoize(function (prop) this.init()[prop]), @@ -1334,7 +1333,6 @@ var DOM = Class("DOM", { return "<" + modifier + key + ">"; }, - defaults: { load: { bubbles: false }, submit: { cancelable: true } @@ -1616,7 +1614,7 @@ var DOM = Class("DOM", { else elem.setAttributeNS(vals[0] || "", key, val); } - args.forEach(function(e) { + args.forEach(function (e) { elem.appendChild(tag(e, namespaces)); }); @@ -1630,7 +1628,7 @@ var DOM = Class("DOM", { else namespaces = fromJSON.namespaces; - return tag(xml, namespaces) + return tag(xml, namespaces); }, { namespaces: { "": "http://www.w3.org/1999/xhtml", @@ -1666,13 +1664,13 @@ var DOM = Class("DOM", { function isFragment(args) !isString(args[0]) || args.length == 0 || args[0] === ""; function hasString(args) { - return args.some(function (a) isString(a) || isFragment(a) && hasString(a)) + return args.some(function (a) isString(a) || isFragment(a) && hasString(a)); } function isStrings(args) { if (!isArray(args)) return util.dump("ARGS: " + {}.toString.call(args) + " " + args), false; - return args.every(function (a) isinstance(a, ["String", DOM.DOMString]) || isFragment(a) && isStrings(a)) + return args.every(function (a) isinstance(a, ["String", DOM.DOMString]) || isFragment(a) && isStrings(a)); } function tag(args, namespaces, indent) { @@ -1727,7 +1725,7 @@ var DOM = Class("DOM", { contents.push(string); }); if (contents.length) - res.push(contents.join("\n"), join) + res.push(contents.join("\n"), join); }); if (res[res.length - 1] == join) res.pop(); @@ -1788,7 +1786,7 @@ var DOM = Class("DOM", { ""); else { let contents = []; - args.forEach(function(e) { + args.forEach(function (e) { let string = tag(e, namespaces, indent + INDENT); if (string) contents.push(string); @@ -1806,7 +1804,7 @@ var DOM = Class("DOM", { else namespaces = DOM.fromJSON.namespaces; - return tag(xml, namespaces, "") + return tag(xml, namespaces, ""); }, parseNamespace: function parseNamespace(name, namespaces) { @@ -1911,4 +1909,4 @@ endModule(); // catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/downloads.jsm b/common/modules/downloads.jsm index fdf5925b..5d718a27 100644 --- a/common/modules/downloads.jsm +++ b/common/modules/downloads.jsm @@ -419,7 +419,6 @@ var Downloads = Module("downloads", XPCOM(Ci.nsIDownloadProgressListener), { let file = download.targetFile.path; let size = download.size; - overlay.modules.forEach(function (modules) { modules.dactyl.echomsg({ domains: [util.getHost(url)], message: _("io.downloadFinished", title, file) }, 1, modules.commandline.ACTIVE_WINDOW); @@ -516,4 +515,4 @@ endModule(); // catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/finder.jsm b/common/modules/finder.jsm index ee85905b..9c1897de 100644 --- a/common/modules/finder.jsm +++ b/common/modules/finder.jsm @@ -851,4 +851,4 @@ var RangeFind = Class("RangeFind", { endModule(); -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/help.jsm b/common/modules/help.jsm index a092ad5c..c8ba828e 100644 --- a/common/modules/help.jsm +++ b/common/modules/help.jsm @@ -131,12 +131,10 @@ var Help = Module("Help", { let beta = array(betas.iterate(NEWS)) .map(function (m) m[1]).uniq().slice(-1)[0]; - function rec(text, level, li) { let res = []; let list, space, i = 0; - for (let match in re.iterate(text)) { if (match.comment) continue; @@ -195,7 +193,6 @@ var Help = Module("Help", { // } // } - return '\n' + '\n' + DOM.toXML(["document", { xmlns: "dactyl", name: "versions", @@ -453,4 +450,4 @@ var Help = Module("Help", { endModule(); -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index bf242e08..7c15945d 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -452,4 +452,4 @@ var Highlights = Module("Highlight", { endModule(); -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/io.jsm b/common/modules/io.jsm index 15f8ac97..f09a4d96 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -149,7 +149,7 @@ var IO = Module("io", { let sourceJSM = function sourceJSM() { context = contexts.Module(uri); dactyl.triggerObserver("io.source", context, file, file.lastModifiedTime); - } + }; if (/\.jsm$/.test(filename)) sourceJSM(); @@ -675,13 +675,13 @@ var IO = Module("io", { item.file = file; } - rtItems.ftdetect.template = // {{{ + rtItems.ftdetect.template = //{{{ literal(/*" Vim filetype detection file
au BufNewFile,BufRead *rc*,*. set filetype= */);//}}} - rtItems.ftplugin.template = // {{{ + rtItems.ftplugin.template = //{{{ literal(/*" Vim filetype plugin file
@@ -708,7 +708,7 @@ endif let &cpo = s:cpo_save unlet s:cpo_save */);//}}} - rtItems.syntax.template = // {{{ + rtItems.syntax.template = //{{{ literal(/*" Vim syntax file
@@ -812,7 +812,7 @@ unlet s:cpo_save return lines.map(function (l) l.join("")).join("\n").replace(/\s+\n/gm, "\n"); }//}}} - let params = { // {{{ + let params = { //{{{ header: ['" Language: ' + config.appName + ' configuration file', '" Maintainer: Doug Kearns ', '" Version: ' + config.version].join("\n"), @@ -830,7 +830,7 @@ unlet s:cpo_save array(o.realNames for (o in options) if (o.type == "boolean")) .flatten().map(String.quote), ", ") + "]" - }; // }}} + }; //}}} for (let { file, template } in values(rtItems)) { try { @@ -1165,4 +1165,4 @@ endModule(); } catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/javascript.jsm b/common/modules/javascript.jsm index a0981d78..28c17612 100644 --- a/common/modules/javascript.jsm +++ b/common/modules/javascript.jsm @@ -900,4 +900,4 @@ endModule(); } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/main.jsm b/common/modules/main.jsm index 41ef16cf..2ad1e36c 100644 --- a/common/modules/main.jsm +++ b/common/modules/main.jsm @@ -92,7 +92,6 @@ var Modules = function Modules(window) { const create = window.Object.create.bind(window.Object); - const BASES = [BASE, "resource://dactyl-local-content/"]; jsmodules = Cu.createObjectIn(window); @@ -357,4 +356,4 @@ endModule(); } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/messages.jsm b/common/modules/messages.jsm index 12ab0f35..0e752928 100644 --- a/common/modules/messages.jsm +++ b/common/modules/messages.jsm @@ -205,4 +205,4 @@ endModule(); // catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/options.jsm b/common/modules/options.jsm index 1440e23c..5b644f5f 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -258,7 +258,7 @@ var Option = Class("Option", { return null; }, - // Properties {{{2 + // Properties {{{ /** @property {string} The option's canonical name. */ name: null, @@ -400,7 +400,8 @@ var Option = Class("Option", { hasChanged: false, /** - * Returns the timestamp when the option's value was last changed. + * @property {number} Returns the timestamp when the option's value was + * last changed. */ get lastSet() options.store.get(this.name).time, set lastSet(val) { options.store.set(this.name, { value: this.globalValue, time: Date.now() }); }, @@ -411,6 +412,7 @@ var Option = Class("Option", { */ setFrom: null + //}}} }, { /** * @property {number} Global option scope. @@ -1566,4 +1568,4 @@ endModule(); } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm index f8a4fb5d..560982c2 100644 --- a/common/modules/overlay.jsm +++ b/common/modules/overlay.jsm @@ -20,7 +20,7 @@ var setAttr = function setAttr(elem, ns, name, val) { elem.removeAttributeNS(ns, name); else elem.setAttributeNS(ns, name, val); -} +}; var Overlay = Class("Overlay", { init: function init(window) { @@ -42,7 +42,6 @@ var Overlay = Class("Overlay", { } }); - var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), { init: function init() { util.addObserver(this); @@ -234,7 +233,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen let iterator = Iterator(obj[key]); if (isArray(obj[key])) { iterator = ([elem[1].id, elem.slice(2), elem[1]] - for each (elem in obj[key])) + for each (elem in obj[key])); } for (let [elem, xml, attrs] in iterator) { @@ -381,7 +380,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen Object.defineProperty(object, k, desc); if (callable(value)) { - var sentinel = "(function DactylOverlay() {}())" + var sentinel = "(function DactylOverlay() {}())"; value.toString = function toString() toString.toString.call(this).replace(/\}?$/, sentinel + "; $&"); value.toSource = function toSource() toSource.toSource.call(this).replace(/\}?$/, sentinel + "; $&"); } @@ -432,4 +431,4 @@ endModule(); } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/prefs.jsm b/common/modules/prefs.jsm index b0fdd176..d01d1c26 100644 --- a/common/modules/prefs.jsm +++ b/common/modules/prefs.jsm @@ -439,4 +439,4 @@ endModule(); } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/protocol.jsm b/common/modules/protocol.jsm index 82b59a39..f73e2092 100644 --- a/common/modules/protocol.jsm +++ b/common/modules/protocol.jsm @@ -44,9 +44,9 @@ function NetError(orig, error) { originalURI: orig, - asyncOpen: function () { throw error || Cr.NS_ERROR_FILE_NOT_FOUND }, + asyncOpen: function () { throw error || Cr.NS_ERROR_FILE_NOT_FOUND; }, - open: function () { throw error || Cr.NS_ERROR_FILE_NOT_FOUND } + open: function () { throw error || Cr.NS_ERROR_FILE_NOT_FOUND; } }).data.QueryInterface(Ci.nsIChannel); } function RedirectChannel(to, orig, time, message) { @@ -72,7 +72,7 @@ function Protocol(scheme, classID, contentBase) { contentBase: contentBase, - _xpcom_factory: JSMLoader.Factory(Protocol), + _xpcom_factory: JSMLoader.Factory(Protocol) }; return Protocol; } @@ -259,4 +259,4 @@ XMLChannel.prototype = { endModule(); -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm index 13644568..f5e08bef 100644 --- a/common/modules/sanitizer.jsm +++ b/common/modules/sanitizer.jsm @@ -200,7 +200,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef template.map(util.range(0, Math.ceil(items.length / 2)), function (i) ["row", {}, template.map(items.slice(i * 2, i * 2 + 2), function (item) - ["checkbox", { xmlns: XUL, label: item.description, preference: branch + item.name }])])]]], + ["checkbox", { xmlns: XUL, label: item.description, preference: branch + item.name }])])]]] } })); } @@ -214,7 +214,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef template.map(ourItems(), function ([item, desc]) ["listitem", { xmlns: "xul", preference: branch + item, type: "checkbox", label: config.appName + ", " + desc, - onsyncfrompreference: "return gSanitizePromptDialog.onReadGeneric();" }]), + onsyncfrompreference: "return gSanitizePromptDialog.onReadGeneric();" }]) ] }, ready: function ready(win) { @@ -507,7 +507,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef description: "Timespan for which to sanitize items", completer: function (context) modules.options.get("sanitizetimespan").completer(context), type: modules.CommandOption.STRING, - validator: function (arg) modules.options.get("sanitizetimespan").validator(arg), + validator: function (arg) modules.options.get("sanitizetimespan").validator(arg) } ], privateData: true @@ -730,4 +730,4 @@ endModule(); // catch(e){dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack);} -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/services.jsm b/common/modules/services.jsm index 5ee191da..b67e8dad 100644 --- a/common/modules/services.jsm +++ b/common/modules/services.jsm @@ -47,7 +47,7 @@ var Services = Module("Services", { this.add("downloadManager", "@mozilla.org/download-manager;1", "nsIDownloadManager"); this.add("environment", "@mozilla.org/process/environment;1", "nsIEnvironment"); this.add("extensionManager", "@mozilla.org/extensions/manager;1", "nsIExtensionManager"); - this.add("externalApp", "@mozilla.org/uriloader/external-helper-app-service;1", "nsPIExternalAppLauncher") + this.add("externalApp", "@mozilla.org/uriloader/external-helper-app-service;1", "nsPIExternalAppLauncher"); this.add("externalProtocol", "@mozilla.org/uriloader/external-protocol-service;1", "nsIExternalProtocolService"); this.add("favicon", "@mozilla.org/browser/favicon-service;1", "nsIFaviconService"); this.add("file:", this.PROTOCOL + "file", "nsIFileProtocolHandler"); @@ -99,7 +99,7 @@ var Services = Module("Services", { this.addClass("Persist", "@mozilla.org/embedding/browser/nsWebBrowserPersist;1", "nsIWebBrowserPersist"); this.addClass("Pipe", "@mozilla.org/pipe;1", "nsIPipe", "init"); this.addClass("Process", "@mozilla.org/process/util;1", "nsIProcess", "init"); - this.addClass("Pump", "@mozilla.org/network/input-stream-pump;1", "nsIInputStreamPump", "init") + this.addClass("Pump", "@mozilla.org/network/input-stream-pump;1", "nsIInputStreamPump", "init"); this.addClass("StreamChannel","@mozilla.org/network/input-stream-channel;1", ["nsIInputStreamChannel", "nsIChannel"], "setURI"); this.addClass("StreamCopier", "@mozilla.org/network/async-stream-copier;1","nsIAsyncStreamCopier", "init"); @@ -214,4 +214,4 @@ endModule(); } catch(e){dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack);} -// vim: set fdm=marker sw=4 sts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index 0f4cc06e..b93f6d41 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -162,7 +162,7 @@ var ObjectStore = Class("ObjectStore", StoreBase, { } }); -var sessionGlobal = Cu.import("resource://gre/modules/Services.jsm", {}) +var sessionGlobal = Cu.import("resource://gre/modules/Services.jsm", {}); var Storage = Module("Storage", { Local: function Local(dactyl, modules, window) ({ @@ -762,7 +762,6 @@ var File = Class("File", { } }, - isAbsolutePath: function isAbsolutePath(path) { try { services.File().initWithPath(path); @@ -793,7 +792,7 @@ let (file = services.directory.get("ProfD", Ci.nsIFile)) { if (!(prop in File.prototype)) { let isFunction; try { - isFunction = callable(file[prop]) + isFunction = callable(file[prop]); } catch (e) {} @@ -814,4 +813,4 @@ endModule(); // catch(e){ dump(e + "\n" + (e.stack || Error().stack)); Components.utils.reportError(e) } -// vim: set fdm=marker sw=4 sts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/styles.jsm b/common/modules/styles.jsm index c89c2812..6de607a2 100644 --- a/common/modules/styles.jsm +++ b/common/modules/styles.jsm @@ -29,7 +29,7 @@ Sheet.liveProperty = function (name) { this[i] = val; this.enabled = this.enabled; }); -} +}; Sheet.liveProperty("agent"); Sheet.liveProperty("css"); Sheet.liveProperty("sites"); @@ -763,9 +763,9 @@ var Styles = Module("Styles", { ]); }), match.postSpace - ] - }) - } + ]; + }); + }; } }); @@ -773,4 +773,4 @@ endModule(); // catch(e){dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack);} -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 47fd94db..5ee5cbbe 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -168,7 +168,6 @@ var Template = Module("Template", { return res; }, - bookmarkDescription: function (item, text) [ !(item.extra && item.extra.length) ? [] : ["span", { highlight: "URLExtra" }, @@ -264,7 +263,6 @@ var Template = Module("Template", { })(), this[help ? "HelpLink" : "helpLink"]); }, - // Fixes some strange stack rewinds on NS_ERROR_OUT_OF_MEMORY // exceptions that we can't catch. stringify: function stringify(arg) { @@ -417,7 +415,6 @@ var Template = Module("Template", { util.losslessDecodeURI(val.URI.spec)]]])]; }, - options: function options(title, opts, verbose) { return ["table", {}, ["tr", { highlight: "Title", align: "left" }, @@ -505,10 +502,10 @@ var Template = Module("Template", { _("io.definedAt"), " ", sourceLink(frame)]]]], item.columns ? self.map(item.columns, function (c) ["td", {}, c]) : [], - ["td", {}, desc(item)]])]] + ["td", {}, desc(item)]])]]; } }); endModule(); -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 0e83efe7..436db405 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -467,7 +467,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), acc.push(vals); if (acc.length == pattern.length) - this.res.push(acc.join("")) + this.res.push(acc.join("")); else for (let val in values(vals)) this.rec(acc.concat(val)); @@ -492,7 +492,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), } res.push(pattern.substr(end)); return res.map(function (s) util.dequote(s, dequote)); - } + }; let patterns = []; let substrings = split(pattern, /((?:[^\\{]|\\.)*)\{((?:[^\\}]|\\.)*)\}/gy, @@ -507,7 +507,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), else for (let [, pattern] in Iterator(patterns[acc.length])) rec(acc.concat(pattern)); - } + }; rec([]); return res; } @@ -659,7 +659,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), [hours, minutes] = div(minutes, 60); [days, hours] = div(hours, 24); if (days) - return /*L*/days + " days " + hours + " hours" + return /*L*/days + " days " + hours + " hours"; if (hours) return /*L*/hours + "h " + minutes + "m"; if (minutes) @@ -755,11 +755,10 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), let async = params.callback || params.onload || params.onerror; if (async) { - xmlhttp.addEventListener("load", function handler(event) { util.trapErrors(params.onload || params.callback, params, xmlhttp, event) }, false); - xmlhttp.addEventListener("error", function handler(event) { util.trapErrors(params.onerror || params.callback, params, xmlhttp, event) }, false); + xmlhttp.addEventListener("load", function handler(event) { util.trapErrors(params.onload || params.callback, params, xmlhttp, event); }, false); + xmlhttp.addEventListener("error", function handler(event) { util.trapErrors(params.onerror || params.callback, params, xmlhttp, event); }, false); } - if (isObject(params.params)) { let data = [encodeURIComponent(k) + "=" + encodeURIComponent(v) for ([k, v] in iter(params.params))]; @@ -882,7 +881,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), let (viewer = docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer) { if (viewer) yield viewer.DOMDocument; - } + }; } } }, @@ -1017,7 +1016,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), } let keyIter = object; if ("__iterator__" in object && !callable(object.__iterator__)) - keyIter = keys(object) + keyIter = keys(object); for (let i in keyIter) { let value = Magic(""); @@ -1097,28 +1096,28 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), if (data.length == 0) res.push("[]"); else { - res.push("[\n") + res.push("[\n"); for (let [i, val] in Iterator(data)) { if (i) res.push(",\n"); - res.push(prefix) + res.push(prefix); rec(val, prefix, seen); } res.push("\n", level, "]"); } } else if (isObject(data)) { - res.push("{\n") + res.push("{\n"); let i = 0; for (let [key, val] in Iterator(data)) { if (i++) res.push(",\n"); - res.push(prefix, JSON.stringify(key), ": ") + res.push(prefix, JSON.stringify(key), ": "); rec(val, prefix, seen); } if (i > 0) - res.push("\n", level, "}") + res.push("\n", level, "}"); else res[res.length - 1] = "{}"; } @@ -1721,7 +1720,6 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), Array: array }); - /** * Math utility methods. * @singleton @@ -1743,4 +1741,4 @@ endModule(); } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: diff --git a/melodactyl/content/config.js b/melodactyl/content/config.js index 273a80cd..20a12983 100644 --- a/melodactyl/content/config.js +++ b/melodactyl/content/config.js @@ -324,4 +324,4 @@ const Config = Module("config", ConfigBase, { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/melodactyl/content/library.js b/melodactyl/content/library.js index 95f16592..5ab691eb 100644 --- a/melodactyl/content/library.js +++ b/melodactyl/content/library.js @@ -61,4 +61,4 @@ const Library = Module("library", { }, { }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/melodactyl/content/player.js b/melodactyl/content/player.js index 8a7bab29..eb4143bd 100644 --- a/melodactyl/content/player.js +++ b/melodactyl/content/player.js @@ -830,4 +830,4 @@ const Player = Module("player", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index 8c10f837..1d22bf8f 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -252,4 +252,4 @@ var Config = Module("config", ConfigBase, { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/teledactyl/content/addressbook.js b/teledactyl/content/addressbook.js index cd9fe12a..6171b413 100644 --- a/teledactyl/content/addressbook.js +++ b/teledactyl/content/addressbook.js @@ -152,4 +152,4 @@ var Addressbook = Module("addressbook", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/teledactyl/content/compose/compose.js b/teledactyl/content/compose/compose.js index 33c5f239..fd883339 100644 --- a/teledactyl/content/compose/compose.js +++ b/teledactyl/content/compose/compose.js @@ -80,4 +80,4 @@ var Compose = Module("compose", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/teledactyl/content/config.js b/teledactyl/content/config.js index 0fae1d29..6c85f30d 100644 --- a/teledactyl/content/config.js +++ b/teledactyl/content/config.js @@ -165,4 +165,4 @@ var Config = Module("config", ConfigBase, { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: diff --git a/teledactyl/content/mail.js b/teledactyl/content/mail.js index cdfe22d4..5db4c6b1 100644 --- a/teledactyl/content/mail.js +++ b/teledactyl/content/mail.js @@ -930,4 +930,4 @@ var Mail = Module("mail", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: