diff --git a/content/bookmarks.js b/content/bookmarks.js index cc9e7563..6c9cb994 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -665,7 +665,7 @@ vimperator.Marks = function() //{{{ } else { - var pattern = new RegExp("[" + filter.replace(/\s+/g, '') + "]"); + var pattern = new RegExp("[" + filter.replace(/\s+/g, "") + "]"); for (var mark in url_marks) { if (pattern.test(mark)) @@ -800,7 +800,7 @@ vimperator.QuickMarks = function() //{{{ this.remove = function(filter) { - var pattern = new RegExp("[" + filter.replace(/\s+/g, '') + "]"); + var pattern = new RegExp("[" + filter.replace(/\s+/g, "") + "]"); for (var qmark in qmarks) { diff --git a/content/buffers.js b/content/buffers.js index a40e1c7c..7ebebb31 100644 --- a/content/buffers.js +++ b/content/buffers.js @@ -154,8 +154,8 @@ vimperator.Buffer = function() //{{{ var result = doc.evaluate(expression, elem, function lookupNamespaceURI(prefix) { switch (prefix) { - case 'xhtml': - return 'http://www.w3.org/1999/xhtml'; + case "xhtml": + return "http://www.w3.org/1999/xhtml"; default: return null; } diff --git a/content/commands.js b/content/commands.js index cde5fda5..5c736b9a 100644 --- a/content/commands.js +++ b/content/commands.js @@ -102,8 +102,8 @@ vimperator.Command.prototype.hasName = function(name) // true if the candidate matches unambiguously function matchAbbreviation(name, format) { - var minimum = format.indexOf('['); // minumum number of characters for a command name match - var fullname = format.replace(/\[(\w+)\]$/, '$1'); // full command name + var minimum = format.indexOf("["); // minumum number of characters for a command name match + var fullname = format.replace(/\[(\w+)\]$/, "$1"); // full command name if (fullname.indexOf(name) == 0 && name.length >= minimum) return true; else @@ -189,7 +189,7 @@ vimperator.Commands = function() //{{{ this.parseCommand = function(str, tag) { // remove comments - str.replace(/\s*".*$/, ''); + str.replace(/\s*".*$/, ""); if (tag) // we already have a multiline heredoc construct { @@ -220,7 +220,7 @@ vimperator.Commands = function() //{{{ matches[4] = tag[1]; } else - matches[3] = ''; + matches[3] = ""; return matches; } @@ -734,7 +734,7 @@ vimperator.Commands = function() //{{{ else { if (!reference[0]) { - if (reference[2] == 'g') + if (reference[2] == "g") reference[0] = vimperator.globalVariables; else return; // for now @@ -742,11 +742,11 @@ vimperator.Commands = function() //{{{ if (match[3]) { - if (match[3] == '+') + if (match[3] == "+") reference[0][reference[1]] += expr; - else if (match[3] == '-') + else if (match[3] == "-") reference[0][reference[1]] -= expr; - else if (match[3] == '.') + else if (match[3] == ".") reference[0][reference[1]] += expr.toString(); } else @@ -762,13 +762,13 @@ vimperator.Commands = function() //{{{ return vimperator.echoerr("E121: Undefined variable: " + match[1]); var value = reference[0][reference[1]]; - if (typeof value == 'number') - var prefix = '#'; - else if (typeof value == 'function') - var prefix = '*'; + if (typeof value == "number") + var prefix = "#"; + else if (typeof value == "function") + var prefix = "*"; else - var prefix = ''; - vimperator.echo(reference[1] + '\t\t' + prefix + value); + var prefix = ""; + vimperator.echo(reference[1] + "\t\t" + prefix + value); } }, { @@ -798,8 +798,8 @@ vimperator.Commands = function() //{{{ if (leader_reg.test(lhs)) { - var leader_ref = vimperator.variableReference('mapleader'); - var leader = leader_ref[0] ? leader_ref[0][leader_ref[1]] : '\\'; + var leader_ref = vimperator.variableReference("mapleader"); + var leader = leader_ref[0] ? leader_ref[0][leader_ref[1]] : "\\"; lhs = lhs.replace(leader_reg, leader); } @@ -877,7 +877,7 @@ vimperator.Commands = function() //{{{ return; } - var filter = args.replace(/[^a-zA-Z]/g, ''); + var filter = args.replace(/[^a-zA-Z]/g, ""); vimperator.marks.list(filter); }, { @@ -1142,7 +1142,7 @@ vimperator.Commands = function() //{{{ return; } - var filter = args.replace(/[^a-zA-Z0-9]/g, ''); + var filter = args.replace(/[^a-zA-Z0-9]/g, ""); vimperator.quickmarks.list(filter); }, { @@ -1449,7 +1449,7 @@ vimperator.Commands = function() //{{{ { if (menu.childNodes[i].label == args) { - eval(menu.childNodes[i].getAttribute('oncommand')); + eval(menu.childNodes[i].getAttribute("oncommand")); break; } } @@ -1765,7 +1765,7 @@ vimperator.Commands = function() //{{{ return vimperator.echoerr("E471: Argument required"); var names = args.split(/ /); - if (typeof names == 'string') names = [names]; + if (typeof names == "string") names = [names]; var length = names.length; for (var i = 0, name = names[i]; i < length; name = names[++i]) { diff --git a/content/completion.js b/content/completion.js index 9534900d..384ea1cd 100644 --- a/content/completion.js +++ b/content/completion.js @@ -171,7 +171,7 @@ vimperator.Completion = function() // {{{ get_longest_substring: function() //{{{ { if (g_substrings.length == 0) - return ''; + return ""; var longest = g_substrings[0]; for (var i = 1; i < g_substrings.length; i++) @@ -198,13 +198,13 @@ vimperator.Completion = function() // {{{ // join all completion arrays together for (var i = 0; i < cpt.length; i++) { - if (cpt[i] == 's') + if (cpt[i] == "s") completions = completions.concat(this.get_search_completions(filter)); - else if (cpt[i] == 'b') + else if (cpt[i] == "b") completions = completions.concat(this.get_bookmark_completions(filter)); - else if (cpt[i] == 'h') + else if (cpt[i] == "h") completions = completions.concat(this.get_history_completions(filter)); - else if (cpt[i] == 'f') + else if (cpt[i] == "f") completions = completions.concat(this.get_file_completions(filter, true)); } @@ -402,7 +402,7 @@ vimperator.Completion = function() // {{{ { try { - title = getBrowser().getBrowserAtIndex(i).contentDocument.getElementsByTagName('title')[0].text; + title = getBrowser().getBrowserAtIndex(i).contentDocument.getElementsByTagName("title")[0].text; } catch (e) { diff --git a/content/events.js b/content/events.js index be815d61..6e6fc0d4 100644 --- a/content/events.js +++ b/content/events.js @@ -598,7 +598,7 @@ vimperator.Events = function() //{{{ } var count_str = vimperator.input.buffer.match(/^[0-9]*/)[0]; - var candidate_command = (vimperator.input.buffer + key).replace(count_str, ''); + var candidate_command = (vimperator.input.buffer + key).replace(count_str, ""); var map; // counts must be at the start of a complete mapping (10j -> go 10 lines down) diff --git a/content/find.js b/content/find.js index 712d8e91..4cebdf33 100644 --- a/content/find.js +++ b/content/find.js @@ -99,7 +99,7 @@ vimperator.Search = function() //{{{ pattern = pattern.replace(/(\\)?\\[cC]/g, function($0, $1) { return $1 ? $0 : ""; }); // remove any modifer escape \ - pattern = pattern.replace(/\\(\\[cCuU])/g, '$1'); + pattern = pattern.replace(/\\(\\[cCuU])/g, "$1"); search_string = pattern; } @@ -247,7 +247,7 @@ vimperator.Search = function() //{{{ { for (var i = 0; i < win.frames.length; i++) arguments.callee(win.frames[i]); - var spans = vimperator.buffer.evaluateXPath('//span[@id="__firefox-findbar-search-id"]', win.document); + var spans = vimperator.buffer.evaluateXPath("//span[@id='__firefox-findbar-search-id']", win.document); for (var i = 0; i < spans.snapshotLength; i++) spans.snapshotItem(i).setAttribute("style", vimperator.options["hlsearchstyle"]); })(window.content); diff --git a/content/help.js b/content/help.js index c10fdf78..30650b02 100644 --- a/content/help.js +++ b/content/help.js @@ -104,7 +104,7 @@ vimperator.help = function(section, easter) //{{{ // add more space between entries ret += separator; } - ret = ret.replace(new RegExp(separator + '$'), ''); // FIXME: far too tasty! + ret = ret.replace(new RegExp(separator + "$"), ""); // FIXME: far too tasty! return ret; } @@ -121,7 +121,7 @@ vimperator.help = function(section, easter) //{{{ } else { - if (typeof command.default_value == 'string' && command.default_value.length == 0) + if (typeof command.default_value == "string" && command.default_value.length == 0) ret += "''"; else ret += command.default_value; @@ -181,14 +181,14 @@ vimperator.help = function(section, easter) //{{{ ''; mappings += makeHelpString(vimperator.mappings, "", "", null); mappings += '
'; - if (section && section == 'holy-grail') + if (section && section == "holy-grail") mappings += '

You found it, Arthur!

\n'; var commands = 'commands

Commands

' + '\n'; commands += makeHelpString(vimperator.commands, ":", "", null); commands += '
'; - if (section && section == '42') + if (section && section == "42") commands += '

What is the meaning of life, the universe and everything?
' + 'Douglas Adams, the only person who knew what this question really was about is
' + 'now dead, unfortunately. So now you might wonder what the meaning of death
' + @@ -268,9 +268,9 @@ vimperator.help = function(section, easter) //{{{ if (!element) { var firstChar = section.charAt(0); - if (firstChar != ':' && firstChar != "'") + if (firstChar != ":" && firstChar != "'") { - element = findSectionElement(':' + section); + element = findSectionElement(":" + section); if (!element) element = findSectionElement("'" + section + "'"); } diff --git a/content/hints.js b/content/hints.js index 93f2d9f7..d6dc04c3 100644 --- a/content/hints.js +++ b/content/hints.js @@ -24,7 +24,7 @@ vimperator.Hints = function() //{{{ { - const HINT_PREFIX = 'hah_hint_'; // prefix for the hint id + const HINT_PREFIX = "hah_hint_"; // prefix for the hint id this.hintedElements = function() { return hintedElems; }; this.currentState = function() { return state;}; @@ -145,15 +145,15 @@ vimperator.Hints = function() //{{{ var elem, i; - hintElemSpan = doc.createElement('SPAN'); + hintElemSpan = doc.createElement("SPAN"); hintElemSpan.style.cssText = vimperator.options["hintstyle"]; - hintElemSpan.setAttribute('name', 'hah_hint'); + hintElemSpan.setAttribute("name", "hah_hint"); - var hintContainer = doc.getElementById('hah_hints'); + var hintContainer = doc.getElementById("hah_hints"); if (hintContainer == null) { genHintContainer(doc); - hintContainer = doc.getElementById('hah_hints'); + hintContainer = doc.getElementById("hah_hints"); if (!hintContainer) return false; } @@ -192,7 +192,7 @@ vimperator.Hints = function() //{{{ hintContainer.appendChild(hintElem); } - hintElem.style.display = 'none'; + hintElem.style.display = "none"; hintElem.style.top = elem.absoTop + "px"; hintElem.style.left = elem.absoLeft + "px"; hintElem.refElem = elem; @@ -223,7 +223,7 @@ vimperator.Hints = function() //{{{ // FIXME: this.disableHahMode(win); vimperator.setMode(vimperator.modes.NORMAL); isHahModeEnabled = false; - linkNumString = ''; + linkNumString = ""; hintedElems = []; return; @@ -231,7 +231,7 @@ vimperator.Hints = function() //{{{ var doc = win.document; var hintElem = null; - var hintContainer = doc.getElementById('hah_hints'); + var hintContainer = doc.getElementById("hah_hints"); var hints = hintContainer.childNodes; var i, j; @@ -239,8 +239,8 @@ vimperator.Hints = function() //{{{ { hintText = formatHint(offset+i); hintElem = hints[i]; - hintElem.style.display = 'inline'; - //hintElem.style.position = 'absolute'; + hintElem.style.display = "inline"; + //hintElem.style.position = "absolute"; hintElem.innerHTML = hintText; hintElem.id = HINT_PREFIX + hintText; } @@ -267,7 +267,7 @@ vimperator.Hints = function() //{{{ { elem = res.snapshotItem(i); setHintStyle(elem, vimperator.options["hintstyle"]); - elem.style.display = 'none'; + elem.style.display = "none"; } for (i = 0; i < win.frames.length; i++) @@ -337,7 +337,7 @@ vimperator.Hints = function() //{{{ var str = hintNum.toString(hintCharacters.length); // turn hintNum into a base(length) number // map the number onto the chars in the numbers string - var result = ''; + var result = ""; // make all links the same length var hintLength = 1; var tmp = linkCount; @@ -405,7 +405,7 @@ vimperator.Hints = function() //{{{ vimperator.setMode(vimperator.modes.HINTS, mode); state = 0; linkCount = 0; - linkNumString = ''; + linkNumString = ""; isHahModeEnabled = true; createHints(); @@ -431,7 +431,7 @@ vimperator.Hints = function() //{{{ vimperator.setMode(vimperator.modes.NORMAL); isHahModeEnabled = false; - linkNumString = ''; + linkNumString = ""; hintedElems = []; removeHints(win); @@ -440,7 +440,7 @@ vimperator.Hints = function() //{{{ this.resetHintedElements = function() { - linkNumString = ''; + linkNumString = ""; state = 0; while (hintedElems.length > 0) @@ -486,11 +486,11 @@ vimperator.Hints = function() //{{{ var elemTagName = elem.localName.toLowerCase(); elem.focus(); - if (elemTagName == 'frame' || elemTagName == 'iframe') + if (elemTagName == "frame" || elemTagName == "iframe") return 0; // for imagemap - if (elemTagName == 'area') + if (elemTagName == "area") { var coords = elem.getAttribute("coords").split(","); x = Number(coords[0]); @@ -499,12 +499,12 @@ vimperator.Hints = function() //{{{ var doc = window.content.document; var view = window.document.defaultView; - var evt = doc.createEvent('MouseEvents'); - evt.initMouseEvent('mousedown', true, true, view, 1, x + 1, y + 1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); + var evt = doc.createEvent("MouseEvents"); + evt.initMouseEvent("mousedown", true, true, view, 1, x + 1, y + 1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); elem.dispatchEvent(evt); - var evt = doc.createEvent('MouseEvents'); - evt.initMouseEvent('click', true, true, view, 1, x + 1, y + 1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); + var evt = doc.createEvent("MouseEvents"); + evt.initMouseEvent("click", true, true, view, 1, x + 1, y + 1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); elem.dispatchEvent(evt); // for 'pure' open calls without a new tab or window it doesn't @@ -525,7 +525,7 @@ vimperator.Hints = function() //{{{ for (var i = 0; i < elems.length; i++) { tmp = elems[i].refElem.href; - if (typeof(tmp) != 'undefined' && tmp.length > 0) + if (typeof(tmp) != "undefined" && tmp.length > 0) { if (i > 0) loc += "\n"; @@ -548,7 +548,7 @@ vimperator.Hints = function() //{{{ for (var i = 0; i < elems.length; i++) { tmp = elems[i].refElem.textContent; - if (typeof(tmp) != 'undefined' && tmp.length > 0) + if (typeof(tmp) != "undefined" && tmp.length > 0) { if (i > 0) loc += "\n"; @@ -590,7 +590,7 @@ vimperator.Hints = function() //{{{ var doc = window.document; var elemTagName = elem.localName.toLowerCase(); - if (elemTagName == 'frame' || elemTagName == 'iframe') + if (elemTagName == "frame" || elemTagName == "iframe") { elem.contentWindow.focus(); return; @@ -600,18 +600,18 @@ vimperator.Hints = function() //{{{ // elem.focus(); //} - var evt = doc.createEvent('MouseEvents'); + var evt = doc.createEvent("MouseEvents"); var x = 0; var y = 0; // for imagemap - if (elemTagName == 'area') + if (elemTagName == "area") { var coords = elem.getAttribute("coords").split(","); x = Number(coords[0]); y = Number(coords[1]); } - evt.initMouseEvent('mouseover', true, true, doc.defaultView, 1, x, y, 0, 0, 0, 0, 0, 0, 0, null); + evt.initMouseEvent("mouseover", true, true, doc.defaultView, 1, x, y, 0, 0, 0, 0, 0, 0, 0, null); elem.dispatchEvent(evt); } @@ -635,7 +635,7 @@ vimperator.Hints = function() //{{{ if (num != null && hintCharacters.toUpperCase().indexOf(num) > -1) { var oldLinkNumString = linkNumString; - linkNumString += '' + num; + linkNumString += "" + num; // update reference to currently selected node; var elem = getHintById(linkNumString); changeHintFocus(linkNumString, oldLinkNumString); @@ -644,7 +644,7 @@ vimperator.Hints = function() //{{{ if (elem) { hintedElems.push(elem); - linkNumString = ''; + linkNumString = ""; state = 1; return hintedElems.length; } @@ -666,10 +666,10 @@ vimperator.Hints = function() //{{{ function genHintContainer(doc) { - if (doc.getElementsByTagName('HINTS').length > 0) + if (doc.getElementsByTagName("HINTS").length > 0) return; - hints = doc.createElement('HINTS'); + hints = doc.createElement("HINTS"); hints.id = "hah_hints"; hints.valid_hint_count = 0; // initially 0 elements are usable as hints @@ -703,7 +703,7 @@ vimperator.Hints = function() //{{{ { state = 0; linkCount = 0; - linkNumString = ''; + linkNumString = ""; isHahModeEnabled = true; setTimeout( function() { diff --git a/content/io.js b/content/io.js index 54d58e27..9161155e 100644 --- a/content/io.js +++ b/content/io.js @@ -49,7 +49,7 @@ vimperator.IO = function() // TODO: proper pathname separator translation like Vim if (WINDOWS) - path = path.replace('/', '\\', 'g'); + path = path.replace("/", "\\", "g"); // expand "~" to VIMPERATOR_HOME or HOME (USERPROFILE or HOMEDRIVE\HOMEPATH on Windows if HOME is not set) if (/^~/.test(path)) diff --git a/content/mappings.js b/content/mappings.js index b0d0ec9e..1a50321d 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -499,7 +499,7 @@ vimperator.Mappings = function() //{{{ flags: vimperator.Mappings.flags.COUNT } )); - addDefaultMap(new vimperator.Map(vimperator.modes.NORMAL, ['', ''], + addDefaultMap(new vimperator.Map(vimperator.modes.NORMAL, ["", ""], function() { if (vimperator.tabs.getTab() == vimperator.tabs.alternate) @@ -522,7 +522,7 @@ vimperator.Mappings = function() //{{{ }, { short_help: "Select the alternate tab", - usage: [''], + usage: [""], help: "The alternate tab is the last selected tab. This provides a quick method of toggling between two tabs." } )); @@ -1077,14 +1077,14 @@ vimperator.Mappings = function() //{{{ } )); addDefaultMap(new vimperator.Map(vimperator.modes.HINTS, [","], - function() { vimperator.input.buffer += ','; vimperator.hints.setCurrentState(0); }, + function() { vimperator.input.buffer += ","; vimperator.hints.setCurrentState(0); }, { cancel_mode: false, always_active: true } )); addDefaultMap(new vimperator.Map(vimperator.modes.HINTS, [":"], - function() { vimperator.commandline.open(':', '', vimperator.modes.EX); }, + function() { vimperator.commandline.open(":", "", vimperator.modes.EX); }, { cancel_mode: false, always_active: true @@ -1173,14 +1173,14 @@ vimperator.Mappings = function() //{{{ // tab management addDefaultMap(new vimperator.Map(vimperator.modes.HINTS, [""], - function() { vimperator.tabs.select('+1', true); }, + function() { vimperator.tabs.select("+1", true); }, { cancel_mode: true, always_active: true } )); // same as gt, but no count supported addDefaultMap(new vimperator.Map(vimperator.modes.HINTS, [""], - function() { vimperator.tabs.select('-1', true); }, + function() { vimperator.tabs.select("-1", true); }, { cancel_mode: true, always_active: true diff --git a/content/options.js b/content/options.js index fbd5aee0..d9226b02 100644 --- a/content/options.js +++ b/content/options.js @@ -296,14 +296,14 @@ vimperator.Options = function() //{{{ // // work around firefox popup blocker - var popup_allowed_events = loadPreference('dom.popup_allowed_events', 'change click dblclick mouseup reset submit'); + var popup_allowed_events = loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit"); if (!popup_allowed_events.match("keypress")) - storePreference('dom.popup_allowed_events', popup_allowed_events + " keypress"); + storePreference("dom.popup_allowed_events", popup_allowed_events + " keypress"); // TODO: shouldn't we be resetting these in destroy() as well? // we have our own typeahead find implementation - storePreference('accessibility.typeaheadfind.autostart', false); - storePreference('accessibility.typeaheadfind', false); // actually the above setting should do it, but has no effect in firefox + storePreference("accessibility.typeaheadfind.autostart", false); + storePreference("accessibility.typeaheadfind", false); // actually the above setting should do it, but has no effect in firefox // start with saved session storePreference("browser.startup.page", 3); @@ -337,9 +337,9 @@ vimperator.Options = function() //{{{ this.destroy = function() { // reset some modified firefox prefs - if (loadPreference('dom.popup_allowed_events', 'change click dblclick mouseup reset submit') + if (loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit") == popup_allowed_events + " keypress") - storePreference('dom.popup_allowed_events', popup_allowed_events); + storePreference("dom.popup_allowed_events", popup_allowed_events); } this.list = function(only_non_default) diff --git a/content/ui.js b/content/ui.js index 91a851eb..0f7d49e0 100644 --- a/content/ui.js +++ b/content/ui.js @@ -100,11 +100,11 @@ vimperator.CommandLine = function() //{{{ var completion_index = UNINITIALIZED; // the containing box for the prompt_widget and command_widget - var commandline_widget = document.getElementById('vimperator-commandline'); + var commandline_widget = document.getElementById("vimperator-commandline"); // the prompt for the current command, for example : or /. Can be blank - var prompt_widget = document.getElementById('vimperator-commandline-prompt'); + var prompt_widget = document.getElementById("vimperator-commandline-prompt"); // the command bar which contains the current command - var command_widget = document.getElementById('vimperator-commandline-command'); + var command_widget = document.getElementById("vimperator-commandline-command"); // the widget used for multiline output var multiline_output_widget = document.getElementById("vimperator-multiline-output"); @@ -520,11 +520,11 @@ vimperator.CommandLine = function() //{{{ var longest = false; var full = false; var wildtype = wim[wild_index++] || wim[wim.length - 1]; - if (wildtype == 'list' || wildtype == 'list:full' || wildtype == 'list:longest') + if (wildtype == "list" || wildtype == "list:full" || wildtype == "list:longest") has_list = true; - if (wildtype == 'longest' || wildtype == 'list:longest') + if (wildtype == "longest" || wildtype == "list:longest") longest = true; - else if (wildtype == 'full' || wildtype == 'list:full') + else if (wildtype == "full" || wildtype == "list:full") full = true; // show the list diff --git a/content/util.js b/content/util.js index 4327d47c..c81fb159 100644 --- a/content/util.js +++ b/content/util.js @@ -93,7 +93,7 @@ vimperator.util = { var matches; // strip each 'URL' - makes things simpler later on - urls[url] = urls[url].replace(/^\s+/, '').replace(/\s+$/, ''); + urls[url] = urls[url].replace(/^\s+/, "").replace(/\s+$/, ""); // FIXME: not really that good (doesn't handle .. in the middle) // check for ./ and ../ (or even .../) to go to a file in the upper directory diff --git a/content/vimperator.js b/content/vimperator.js index 1a4fa6a4..bd32f6cd 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -73,9 +73,9 @@ const vimperator = (function() //{{{ var callbacks = []; // our services - var sound_service = Components.classes['@mozilla.org/sound;1'] + var sound_service = Components.classes["@mozilla.org/sound;1"] .getService(Components.interfaces.nsISound); - var console_service = Components.classes['@mozilla.org/consoleservice;1'] + var console_service = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); var environment_service = Components.classes["@mozilla.org/process/environment;1"] .getService(Components.interfaces.nsIEnvironment); @@ -243,7 +243,7 @@ const vimperator = (function() //{{{ if (!modifiers) modifiers = {}; - var [count, cmd, special, args] = vimperator.commands.parseCommand(str.replace(/^'(.*)'$/, '$1')); + var [count, cmd, special, args] = vimperator.commands.parseCommand(str.replace(/^'(.*)'$/, "$1")); var command = vimperator.commands.get(cmd); if (command === null) @@ -406,7 +406,7 @@ const vimperator = (function() //{{{ if (typeof msg == "object") msg = this.objectToString(msg, false); - console_service.logStringMessage('vimperator: ' + msg); + console_service.logStringMessage("vimperator: " + msg); }, // open one or more URLs