diff --git a/content/bookmarks.js b/content/bookmarks.js index f18ff70b..d64aad23 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -330,7 +330,7 @@ vimperator.Bookmarks = function () //{{{ }; //}}} -} //}}} +}; //}}} vimperator.History = function () //{{{ { @@ -484,7 +484,7 @@ vimperator.History = function () //{{{ }; //}}} -} //}}} +}; //}}} vimperator.Marks = function () //{{{ { @@ -743,7 +743,7 @@ vimperator.Marks = function () //{{{ }; //}}} -} //}}} +}; //}}} vimperator.QuickMarks = function () //{{{ { @@ -852,6 +852,6 @@ vimperator.QuickMarks = function () //{{{ } }; //}}} -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/buffers.js b/content/buffers.js index 57250736..6eece9b8 100644 --- a/content/buffers.js +++ b/content/buffers.js @@ -326,7 +326,7 @@ vimperator.Buffer = function () //{{{ if (frame.document.body.localName.toLowerCase() == "body") frames.push(frame); for (var i = 0; i < frame.frames.length; i++) - arguments.callee(frame.frames[i]) + arguments.callee(frame.frames[i]); })(window.content); if (frames.length == 0) // currently top is always included @@ -735,6 +735,6 @@ vimperator.Buffer = function () //{{{ }; //}}} -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/commands.js b/content/commands.js index ba8beba6..ace5d391 100644 --- a/content/commands.js +++ b/content/commands.js @@ -57,7 +57,7 @@ vimperator.Command = function (specs, action, extra_info) //{{{ } } return { names: names, long_names: long_names, short_names: short_names }; - } + }; this.specs = specs; var expanded_specs = parseSpecs(specs); @@ -88,12 +88,12 @@ vimperator.Command = function (specs, action, extra_info) //{{{ this.args = extra_info.args || []; } -} +}; vimperator.Command.prototype.execute = function (args, special, count, modifiers) { return this.action.call(this, args, special, count, modifiers); -} +}; // return true if the candidate name matches one of the command's aliases // (including all acceptable abbreviations) @@ -124,7 +124,7 @@ vimperator.Command.prototype.hasName = function (name) } } return false; -} +}; //}}} vimperator.Commands = function () //{{{ @@ -151,7 +151,7 @@ vimperator.Commands = function () //{{{ vimperator.Commands.prototype[command.name] = function (args, special, count, modifiers) { command.execute(args, special, count, modifiers); - } + }; } // in '-quoted strings, only ' and \ itself are escaped @@ -455,7 +455,7 @@ vimperator.Commands = function () //{{{ this.__iterator__ = function () { return commandsIterator(); - } + }; this.add = function (command) { @@ -465,7 +465,7 @@ vimperator.Commands = function () //{{{ ex_commands.push(command); return true; - } + }; this.get = function (name) { @@ -476,7 +476,7 @@ vimperator.Commands = function () //{{{ } return null; - } + }; // TODO: generalized 0 count handling -> "Zero count" // FIXME: doesn't really belong here... @@ -519,7 +519,7 @@ vimperator.Commands = function () //{{{ matches[3] = ""; return matches; - } + }; /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// DEFAULT COMMANDS //////////////////////////////////////// @@ -1108,7 +1108,7 @@ vimperator.Commands = function () //{{{ return; } - var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) + var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/); var [lhs, rhs] = [matches[1], matches[2]]; if (rhs) vimperator.editor.addAbbreviation("!", lhs, rhs); @@ -1132,7 +1132,7 @@ vimperator.Commands = function () //{{{ return; } - var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) + var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/); var [lhs, rhs] = [matches[1], matches[2]]; if (rhs) vimperator.editor.addAbbreviation("c", lhs, rhs); @@ -1154,7 +1154,7 @@ vimperator.Commands = function () //{{{ return; } - var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) + var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/); var [lhs, rhs] = [matches[1], matches[2]]; if (rhs) vimperator.editor.addAbbreviation("i", lhs, rhs); @@ -1239,7 +1239,7 @@ vimperator.Commands = function () //{{{ } } addDefaultCommand(new vimperator.Command(["map"], - function (args) { map(args, false) }, + function (args) { map(args, false); }, { usage: ["map {lhs} {rhs}", "map {lhs}", "map"], short_help: "Map the key sequence {lhs} to {rhs}", @@ -1355,7 +1355,7 @@ vimperator.Commands = function () //{{{ line += abbrCmd; // source a user .vimperatorrc file - line += "\nsource! " + filename + ".local\n" + line += "\nsource! " + filename + ".local\n"; line += "\n\" vim: set ft=vimperator:"; vimperator.io.writeFile(file, line); @@ -1399,7 +1399,7 @@ vimperator.Commands = function () //{{{ )); // TODO: remove duplication in :map addDefaultCommand(new vimperator.Command(["no[remap]"], - function (args) { map(args, true) }, + function (args) { map(args, true); }, { usage: ["no[remap] {lhs} {rhs}", "no[remap] {lhs}", "no[remap]"], short_help: "Map the key sequence {lhs} to {rhs}", @@ -2334,6 +2334,6 @@ vimperator.Commands = function () //{{{ } )); //}}} -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/completion.js b/content/completion.js index 44213467..e56e3adb 100644 --- a/content/completion.js +++ b/content/completion.js @@ -359,7 +359,7 @@ vimperator.Completion = function () // {{{ get_sidebar_completions: function (filter) //{{{ { g_substrings = []; - var menu = document.getElementById("viewSidebarMenu") + var menu = document.getElementById("viewSidebarMenu"); var nodes = []; for (var i = 0; i < menu.childNodes.length; i++) @@ -611,6 +611,6 @@ vimperator.Completion = function () // {{{ } //}}} }; -} // }}} +}; // }}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/editor.js b/content/editor.js index 3db8f5ba..3469ae13 100644 --- a/content/editor.js +++ b/content/editor.js @@ -643,6 +643,6 @@ vimperator.Editor = function () //{{{ } //}}} }; -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/events.js b/content/events.js index 7da34154..d88af378 100644 --- a/content/events.js +++ b/content/events.js @@ -260,7 +260,7 @@ vimperator.Events = function () //{{{ window.removeEventListener("keypress", this.onKeyPress, true); window.removeEventListener("keydown", this.onKeyDown, true); - } + }; // This method pushes keys into the event queue from vimperator // it is similar to vim's feedkeys() method, but cannot cope with @@ -326,7 +326,7 @@ vimperator.Events = function () //{{{ evt.noremap = noremap; elem.dispatchEvent(evt); } - } + }; // this function converts the given event to // a keycode which can be used in mappings @@ -406,16 +406,16 @@ vimperator.Events = function () //{{{ // a key like F1 is always enclosed in < and > return "<" + modifier + key + ">"; - } //}}} + }; //}}} this.isAcceptKey = function (key) { return (key == "" || key == "" || key == ""); - } + }; this.isCancelKey = function (key) { return (key == "" || key == "" || key == ""); - } + }; // argument "event" is delibarately not used, as i don't seem to have // access to the real focus target @@ -460,7 +460,7 @@ vimperator.Events = function () //{{{ vimperator.modes.reset(); }, 10); } - } + }; this.onSelectionChange = function (event) { @@ -485,7 +485,7 @@ vimperator.Events = function () //{{{ // if (!could_copy && vimperator.modes.extended & vimperator.modes.CARET) // vimperator.mode = vimperator.modes.CARET; //} - } + }; // global escape handler, is called in ALL modes this.onEscape = function () @@ -545,7 +545,7 @@ vimperator.Events = function () //{{{ vimperator.focusContent(true); } } - } + }; // this keypress handler gets always called first, even if e.g. // the commandline has focus @@ -728,7 +728,7 @@ vimperator.Events = function () //{{{ var motion_map = (vimperator.input.pendingMotionMap && vimperator.input.pendingMotionMap.names[0]) || ""; vimperator.statusline.updateInputBuffer(motion_map + vimperator.input.buffer); return false; - } + }; window.addEventListener("keypress", this.onKeyPress, true); // this is need for sites like msn.com which focus the input field on keydown @@ -739,7 +739,7 @@ vimperator.Events = function () //{{{ event.stopPropagation(); return false; - } + }; window.addEventListener("keydown", this.onKeyUpOrDown, true); window.addEventListener("keyup", this.onKeyUpOrDown, true); @@ -872,10 +872,10 @@ vimperator.Events = function () //{{{ break; } } - } + }; this.prefObserver.register(); //}}} -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/find.js b/content/find.js index 8cfd167c..0a36661f 100644 --- a/content/find.js +++ b/content/find.js @@ -260,6 +260,6 @@ vimperator.Search = function () //{{{ } }; -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/help.js b/content/help.js index 51623825..a4b6b079 100644 --- a/content/help.js +++ b/content/help.js @@ -286,6 +286,6 @@ vimperator.help = function (section, easter) //{{{ window.content.scrollTo(0, pos[1]); } }, 0); -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/hints.js b/content/hints.js index be374b3e..7b3891c2 100644 --- a/content/hints.js +++ b/content/hints.js @@ -682,7 +682,7 @@ vimperator.Hints = function () //{{{ processHints(followFirst); } return; - } + }; // FIXME: add resize support // window.addEventListener("resize", onResize, null); @@ -695,6 +695,6 @@ vimperator.Hints = function () //{{{ // doc = window.content.document; // } -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/io.js b/content/io.js index 35607029..6a3f1da6 100644 --- a/content/io.js +++ b/content/io.js @@ -235,6 +235,6 @@ vimperator.IO = function () ofstream.close(); } }; -} +}; // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/mappings.js b/content/mappings.js index c6818e60..c6ced0b6 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -63,7 +63,7 @@ vimperator.Map = function (modes, cmds, action, extra_info) //{{{ this.cancel_mode = extra_info.cancel_mode || false; this.always_active = extra_info.always_active || false; } -} +}; vimperator.Map.prototype.hasName = function (name) { @@ -74,7 +74,7 @@ vimperator.Map.prototype.hasName = function (name) } return false; -} +}; // Since we will add many Map-objects, we add some functions as prototypes // this will ensure we only have one copy of each function, not one for each object @@ -89,7 +89,7 @@ vimperator.Map.prototype.execute = function (motion, count, argument) args.push(argument); return this.action.apply(this, args); -} +}; //}}} vimperator.Mappings = function () //{{{ @@ -187,19 +187,19 @@ vimperator.Mappings = function () //{{{ this.__iterator__ = function () { return mappingsIterator(vimperator.modes.NORMAL, main); - } + }; // FIXME this.getIterator = function (mode) { return mappingsIterator(mode, main); - } + }; // FIXME this.getUserIterator = function (mode) { return mappingsIterator(mode, user); - } + }; this.hasMap = function (mode, cmd) { @@ -212,7 +212,7 @@ vimperator.Mappings = function () //{{{ } return false; - } + }; this.add = function (map) { @@ -226,17 +226,17 @@ vimperator.Mappings = function () //{{{ for (var k = 0; k < map.modes.length; k++) user[map.modes[k]].push(map); - } + }; this.remove = function (mode, cmd) { removeMap(mode, cmd); - } + }; this.removeAll = function (mode) { user[mode] = []; - } + }; this.get = function (mode, cmd) { @@ -246,13 +246,13 @@ vimperator.Mappings = function () //{{{ map = getMap(mode, cmd, main); return map; - } + }; // TODO: move default maps to their own v.normal namespace this.getDefaultMap = function (mode, cmd) { return getMap(mode, cmd, main); - } + }; // returns an array of mappings with names which start with "cmd" this.getCandidates = function (mode, cmd) @@ -277,7 +277,7 @@ vimperator.Mappings = function () //{{{ } return matches; - } + }; this.list = function (mode, filter) { @@ -297,14 +297,14 @@ vimperator.Mappings = function () //{{{ list += ""; list += " " + vimperator.util.escapeHTML(maps[i].names[j]) + ""; if (maps[i].rhs) - list += " " + vimperator.util.escapeHTML(maps[i].rhs) + "" + list += " " + vimperator.util.escapeHTML(maps[i].rhs) + ""; list += ""; } } list += ""; vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE); - } + }; /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// DEFAULT MAPPINGS //////////////////////////////////////// @@ -2014,6 +2014,6 @@ vimperator.Mappings = function () //{{{ //}}} -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/options.js b/content/options.js index 775646af..7e46aaa4 100644 --- a/content/options.js +++ b/content/options.js @@ -104,7 +104,7 @@ vimperator.Option = function (names, type, extra_info) //{{{ return true; } return false; - } + }; this.isValidValue = function (value) { @@ -112,13 +112,13 @@ vimperator.Option = function (names, type, extra_info) //{{{ return this.validator(value); else return true; - } + }; this.reset = function () { this.value = this.default_value; - } -} //}}} + }; +}; //}}} vimperator.Options = function () //{{{ { @@ -315,7 +315,7 @@ vimperator.Options = function () //{{{ this.__iterator__ = function () { return optionsIterator(); - } + }; this.get = function (name) { @@ -325,14 +325,14 @@ vimperator.Options = function () //{{{ return options[i]; } return null; - } + }; this.add = function (option) { this.__defineGetter__(option.name, function () { return option.value; }); this.__defineSetter__(option.name, function (value) { option.value = value; }); options.push(option); - } + }; this.destroy = function () { @@ -340,7 +340,7 @@ vimperator.Options = function () //{{{ if (loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit") == popup_allowed_events + " keypress") storePreference("dom.popup_allowed_events", popup_allowed_events); - } + }; this.list = function (only_non_default) { @@ -382,7 +382,7 @@ vimperator.Options = function () //{{{ list += ""; vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE); - } + }; // this hack is only needed, because we need to do asynchronous loading of the .vimperatorrc this.setInitialGUI = function () @@ -393,29 +393,29 @@ vimperator.Options = function () //{{{ this.get("laststatus").reset(); if (!showtabline_done) this.get("showtabline").reset(); - } + }; // TODO: separate Preferences from Options? Would these utility functions // be better placed in the 'core' vimperator namespace somewhere? this.setPref = function (name, value) { return storePreference(name, value, true); - } + }; this.getPref = function (name, forced_default) { return loadPreference(name, forced_default, true); - } + }; this.setFirefoxPref = function (name, value) { return storePreference(name, value); - } + }; this.getFirefoxPref = function (name, forced_default) { return loadPreference(name, forced_default); - } + }; /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// DEFAULT OPTIONS ///////////////////////////////////////// @@ -424,7 +424,7 @@ vimperator.Options = function () //{{{ const DEFAULT_HINTTAGS = "//*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @class='s'] | " + "//input[not(@type='hidden')] | //a | //area | //iframe | //textarea | //button | //select | " + "//xhtml:*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @class='s'] | " + - "//xhtml:input[not(@type='hidden')] | //xhtml:a | //xhtml:area | //xhtml:iframe | //xhtml:textarea | //xhtml:button | //xhtml:select" + "//xhtml:input[not(@type='hidden')] | //xhtml:a | //xhtml:area | //xhtml:iframe | //xhtml:textarea | //xhtml:button | //xhtml:select"; this.add(new vimperator.Option(["activate", "act"], "stringlist", { @@ -608,7 +608,7 @@ vimperator.Options = function () //{{{ "" + "The order matters", default_value: "gfm", - validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1) } + validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1); } } )); this.add(new vimperator.Option(["popups", "pps"], "number", @@ -779,6 +779,6 @@ vimperator.Options = function () //{{{ setTitleString(this.titlestring); setPopups(this.popups); -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/tabs.js b/content/tabs.js index 3e761fae..a5429f76 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -101,12 +101,12 @@ vimperator.Tabs = function () //{{{ } return getBrowser().tabContainer.selectedIndex; - } + }; this.count = function () { return getBrowser().mTabs.length; - } + }; // TODO: implement filter // @returns an array of tabs which match filter @@ -122,7 +122,7 @@ vimperator.Tabs = function () //{{{ buffers.push([number, title, uri]); } return buffers; - } + }; this.getTab = function (index) { @@ -130,7 +130,7 @@ vimperator.Tabs = function () //{{{ return getBrowser().mTabs[index]; return getBrowser().tabContainer.selectedItem; - } + }; /* spec == "" moves the tab to the last position as per Vim * wrap causes the movement to wrap around the start and end of the tab list @@ -144,7 +144,7 @@ vimperator.Tabs = function () //{{{ var index = indexFromSpec(spec, wrap); getBrowser().moveTabTo(tab, index); - } + }; /* quit_on_last_tab = 1: quit without saving session * quit_on_last_tab = 2: quit and save session @@ -201,12 +201,12 @@ vimperator.Tabs = function () //{{{ for (; i >= index; i--) removeOrBlankTab(this.getTab(i)); } - } + }; this.keepOnly = function (tab) { getBrowser().removeAllTabsBut(tab); - } + }; this.select = function (spec, wrap) { @@ -217,7 +217,7 @@ vimperator.Tabs = function () //{{{ return false; } getBrowser().mTabContainer.selectedIndex = index; - } + }; // TODO: when restarting a session FF selects the first tab and then the // tab that was selected when the session was created. As a result the @@ -227,7 +227,7 @@ vimperator.Tabs = function () //{{{ { alternates = [this.getTab(), alternates[0]]; this.alternate = alternates[1]; - } + }; // TODO: move to v.buffers this.alternate = this.getTab(); @@ -244,7 +244,7 @@ vimperator.Tabs = function () //{{{ { getBrowser().reloadTab(tab); } - } + }; this.reloadAll = function (bypass_cache) { @@ -254,7 +254,7 @@ vimperator.Tabs = function () //{{{ { try { - this.reload(getBrowser().mTabs[i], bypass_cache) + this.reload(getBrowser().mTabs[i], bypass_cache); } catch (e) { @@ -267,8 +267,8 @@ vimperator.Tabs = function () //{{{ { getBrowser().reloadAllTabs(); } - } + }; //}}} -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/ui.js b/content/ui.js index 2b9cc3d4..d8d478b2 100644 --- a/content/ui.js +++ b/content/ui.js @@ -838,7 +838,7 @@ vimperator.CommandLine = function () //{{{ }; //}}} -} //}}} +}; //}}} /** * The list which is used for the completion box, the preview window and the buffer preview window @@ -1051,7 +1051,7 @@ vimperator.InformationList = function (id, options) //{{{ }; //}}} -} //}}} +}; //}}} vimperator.StatusLine = function () //{{{ { @@ -1135,7 +1135,7 @@ vimperator.StatusLine = function () //{{{ modified += "-"; if (modified) - url += " [" + modified + "]" + url += " [" + modified + "]"; url_widget.value = url; }, @@ -1211,6 +1211,6 @@ vimperator.StatusLine = function () //{{{ }; //}}} -} //}}} +}; //}}} // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/util.js b/content/util.js index 5f4c9fb3..967cb942 100644 --- a/content/util.js +++ b/content/util.js @@ -182,10 +182,10 @@ vimperator.util = { strNum[0] = strNum[0].substring(0, u) + "," + strNum[0].substring(u, strNum[0].length); if (strNum[1]) - strNum[0] += "." + strNum[1] + strNum[0] += "." + strNum[1]; return strNum[0]; } -} +}; // vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/vimperator.js b/content/vimperator.js index 9aa061eb..8fbc8a7f 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -753,7 +753,7 @@ const vimperator = (function () //{{{ thread.dispatch(new CallbackEvent(func, args), thread.DISPATCH_SYNC); } - } //}}} + }; //}}} })(); //}}} // called when the chrome is fully loaded and before the main window is shown