1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 09:27:59 +01:00

add more missing semicolons

This commit is contained in:
Doug Kearns
2007-11-11 03:01:55 +00:00
parent 434844b688
commit c362c70f03
16 changed files with 95 additions and 95 deletions

View File

@@ -330,7 +330,7 @@ vimperator.Bookmarks = function () //{{{
}; };
//}}} //}}}
} //}}} }; //}}}
vimperator.History = function () //{{{ vimperator.History = function () //{{{
{ {
@@ -484,7 +484,7 @@ vimperator.History = function () //{{{
}; };
//}}} //}}}
} //}}} }; //}}}
vimperator.Marks = function () //{{{ vimperator.Marks = function () //{{{
{ {
@@ -743,7 +743,7 @@ vimperator.Marks = function () //{{{
}; };
//}}} //}}}
} //}}} }; //}}}
vimperator.QuickMarks = function () //{{{ vimperator.QuickMarks = function () //{{{
{ {
@@ -852,6 +852,6 @@ vimperator.QuickMarks = function () //{{{
} }
}; };
//}}} //}}}
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -326,7 +326,7 @@ vimperator.Buffer = function () //{{{
if (frame.document.body.localName.toLowerCase() == "body") if (frame.document.body.localName.toLowerCase() == "body")
frames.push(frame); frames.push(frame);
for (var i = 0; i < frame.frames.length; i++) for (var i = 0; i < frame.frames.length; i++)
arguments.callee(frame.frames[i]) arguments.callee(frame.frames[i]);
})(window.content); })(window.content);
if (frames.length == 0) // currently top is always included 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: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -57,7 +57,7 @@ vimperator.Command = function (specs, action, extra_info) //{{{
} }
} }
return { names: names, long_names: long_names, short_names: short_names }; return { names: names, long_names: long_names, short_names: short_names };
} };
this.specs = specs; this.specs = specs;
var expanded_specs = parseSpecs(specs); var expanded_specs = parseSpecs(specs);
@@ -88,12 +88,12 @@ vimperator.Command = function (specs, action, extra_info) //{{{
this.args = extra_info.args || []; this.args = extra_info.args || [];
} }
} };
vimperator.Command.prototype.execute = function (args, special, count, modifiers) vimperator.Command.prototype.execute = function (args, special, count, modifiers)
{ {
return this.action.call(this, 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 // return true if the candidate name matches one of the command's aliases
// (including all acceptable abbreviations) // (including all acceptable abbreviations)
@@ -124,7 +124,7 @@ vimperator.Command.prototype.hasName = function (name)
} }
} }
return false; return false;
} };
//}}} //}}}
vimperator.Commands = function () //{{{ vimperator.Commands = function () //{{{
@@ -151,7 +151,7 @@ vimperator.Commands = function () //{{{
vimperator.Commands.prototype[command.name] = function (args, special, count, modifiers) vimperator.Commands.prototype[command.name] = function (args, special, count, modifiers)
{ {
command.execute(args, special, count, modifiers); command.execute(args, special, count, modifiers);
} };
} }
// in '-quoted strings, only ' and \ itself are escaped // in '-quoted strings, only ' and \ itself are escaped
@@ -455,7 +455,7 @@ vimperator.Commands = function () //{{{
this.__iterator__ = function () this.__iterator__ = function ()
{ {
return commandsIterator(); return commandsIterator();
} };
this.add = function (command) this.add = function (command)
{ {
@@ -465,7 +465,7 @@ vimperator.Commands = function () //{{{
ex_commands.push(command); ex_commands.push(command);
return true; return true;
} };
this.get = function (name) this.get = function (name)
{ {
@@ -476,7 +476,7 @@ vimperator.Commands = function () //{{{
} }
return null; return null;
} };
// TODO: generalized 0 count handling -> "Zero count" // TODO: generalized 0 count handling -> "Zero count"
// FIXME: doesn't really belong here... // FIXME: doesn't really belong here...
@@ -519,7 +519,7 @@ vimperator.Commands = function () //{{{
matches[3] = ""; matches[3] = "";
return matches; return matches;
} };
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// DEFAULT COMMANDS //////////////////////////////////////// ////////////////////// DEFAULT COMMANDS ////////////////////////////////////////
@@ -1108,7 +1108,7 @@ vimperator.Commands = function () //{{{
return; return;
} }
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
var [lhs, rhs] = [matches[1], matches[2]]; var [lhs, rhs] = [matches[1], matches[2]];
if (rhs) if (rhs)
vimperator.editor.addAbbreviation("!", lhs, rhs); vimperator.editor.addAbbreviation("!", lhs, rhs);
@@ -1132,7 +1132,7 @@ vimperator.Commands = function () //{{{
return; return;
} }
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
var [lhs, rhs] = [matches[1], matches[2]]; var [lhs, rhs] = [matches[1], matches[2]];
if (rhs) if (rhs)
vimperator.editor.addAbbreviation("c", lhs, rhs); vimperator.editor.addAbbreviation("c", lhs, rhs);
@@ -1154,7 +1154,7 @@ vimperator.Commands = function () //{{{
return; return;
} }
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
var [lhs, rhs] = [matches[1], matches[2]]; var [lhs, rhs] = [matches[1], matches[2]];
if (rhs) if (rhs)
vimperator.editor.addAbbreviation("i", lhs, rhs); vimperator.editor.addAbbreviation("i", lhs, rhs);
@@ -1239,7 +1239,7 @@ vimperator.Commands = function () //{{{
} }
} }
addDefaultCommand(new vimperator.Command(["map"], addDefaultCommand(new vimperator.Command(["map"],
function (args) { map(args, false) }, function (args) { map(args, false); },
{ {
usage: ["map {lhs} {rhs}", "map {lhs}", "map"], usage: ["map {lhs} {rhs}", "map {lhs}", "map"],
short_help: "Map the key sequence {lhs} to {rhs}", short_help: "Map the key sequence {lhs} to {rhs}",
@@ -1355,7 +1355,7 @@ vimperator.Commands = function () //{{{
line += abbrCmd; line += abbrCmd;
// source a user .vimperatorrc file // source a user .vimperatorrc file
line += "\nsource! " + filename + ".local\n" line += "\nsource! " + filename + ".local\n";
line += "\n\" vim: set ft=vimperator:"; line += "\n\" vim: set ft=vimperator:";
vimperator.io.writeFile(file, line); vimperator.io.writeFile(file, line);
@@ -1399,7 +1399,7 @@ vimperator.Commands = function () //{{{
)); ));
// TODO: remove duplication in :map // TODO: remove duplication in :map
addDefaultCommand(new vimperator.Command(["no[remap]"], 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]"], usage: ["no[remap] {lhs} {rhs}", "no[remap] {lhs}", "no[remap]"],
short_help: "Map the key sequence {lhs} to {rhs}", 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: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -359,7 +359,7 @@ vimperator.Completion = function () // {{{
get_sidebar_completions: function (filter) //{{{ get_sidebar_completions: function (filter) //{{{
{ {
g_substrings = []; g_substrings = [];
var menu = document.getElementById("viewSidebarMenu") var menu = document.getElementById("viewSidebarMenu");
var nodes = []; var nodes = [];
for (var i = 0; i < menu.childNodes.length; i++) 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: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -643,6 +643,6 @@ vimperator.Editor = function () //{{{
} //}}} } //}}}
}; };
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -260,7 +260,7 @@ vimperator.Events = function () //{{{
window.removeEventListener("keypress", this.onKeyPress, true); window.removeEventListener("keypress", this.onKeyPress, true);
window.removeEventListener("keydown", this.onKeyDown, true); window.removeEventListener("keydown", this.onKeyDown, true);
} };
// This method pushes keys into the event queue from vimperator // This method pushes keys into the event queue from vimperator
// it is similar to vim's feedkeys() method, but cannot cope with // it is similar to vim's feedkeys() method, but cannot cope with
@@ -326,7 +326,7 @@ vimperator.Events = function () //{{{
evt.noremap = noremap; evt.noremap = noremap;
elem.dispatchEvent(evt); elem.dispatchEvent(evt);
} }
} };
// this function converts the given event to // this function converts the given event to
// a keycode which can be used in mappings // a keycode which can be used in mappings
@@ -406,16 +406,16 @@ vimperator.Events = function () //{{{
// a key like F1 is always enclosed in < and > // a key like F1 is always enclosed in < and >
return "<" + modifier + key + ">"; return "<" + modifier + key + ">";
} //}}} }; //}}}
this.isAcceptKey = function (key) this.isAcceptKey = function (key)
{ {
return (key == "<Return>" || key == "<C-j>" || key == "<C-m>"); return (key == "<Return>" || key == "<C-j>" || key == "<C-m>");
} };
this.isCancelKey = function (key) this.isCancelKey = function (key)
{ {
return (key == "<Esc>" || key == "<C-[>" || key == "<C-c>"); return (key == "<Esc>" || key == "<C-[>" || key == "<C-c>");
} };
// argument "event" is delibarately not used, as i don't seem to have // argument "event" is delibarately not used, as i don't seem to have
// access to the real focus target // access to the real focus target
@@ -460,7 +460,7 @@ vimperator.Events = function () //{{{
vimperator.modes.reset(); vimperator.modes.reset();
}, 10); }, 10);
} }
} };
this.onSelectionChange = function (event) this.onSelectionChange = function (event)
{ {
@@ -485,7 +485,7 @@ vimperator.Events = function () //{{{
// if (!could_copy && vimperator.modes.extended & vimperator.modes.CARET) // if (!could_copy && vimperator.modes.extended & vimperator.modes.CARET)
// vimperator.mode = vimperator.modes.CARET; // vimperator.mode = vimperator.modes.CARET;
//} //}
} };
// global escape handler, is called in ALL modes // global escape handler, is called in ALL modes
this.onEscape = function () this.onEscape = function ()
@@ -545,7 +545,7 @@ vimperator.Events = function () //{{{
vimperator.focusContent(true); vimperator.focusContent(true);
} }
} }
} };
// this keypress handler gets always called first, even if e.g. // this keypress handler gets always called first, even if e.g.
// the commandline has focus // the commandline has focus
@@ -728,7 +728,7 @@ vimperator.Events = function () //{{{
var motion_map = (vimperator.input.pendingMotionMap && vimperator.input.pendingMotionMap.names[0]) || ""; var motion_map = (vimperator.input.pendingMotionMap && vimperator.input.pendingMotionMap.names[0]) || "";
vimperator.statusline.updateInputBuffer(motion_map + vimperator.input.buffer); vimperator.statusline.updateInputBuffer(motion_map + vimperator.input.buffer);
return false; return false;
} };
window.addEventListener("keypress", this.onKeyPress, true); window.addEventListener("keypress", this.onKeyPress, true);
// this is need for sites like msn.com which focus the input field on keydown // this is need for sites like msn.com which focus the input field on keydown
@@ -739,7 +739,7 @@ vimperator.Events = function () //{{{
event.stopPropagation(); event.stopPropagation();
return false; return false;
} };
window.addEventListener("keydown", this.onKeyUpOrDown, true); window.addEventListener("keydown", this.onKeyUpOrDown, true);
window.addEventListener("keyup", this.onKeyUpOrDown, true); window.addEventListener("keyup", this.onKeyUpOrDown, true);
@@ -872,10 +872,10 @@ vimperator.Events = function () //{{{
break; break;
} }
} }
} };
this.prefObserver.register(); this.prefObserver.register();
//}}} //}}}
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -260,6 +260,6 @@ vimperator.Search = function () //{{{
} }
}; };
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -286,6 +286,6 @@ vimperator.help = function (section, easter) //{{{
window.content.scrollTo(0, pos[1]); window.content.scrollTo(0, pos[1]);
} }
}, 0); }, 0);
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -682,7 +682,7 @@ vimperator.Hints = function () //{{{
processHints(followFirst); processHints(followFirst);
} }
return; return;
} };
// FIXME: add resize support // FIXME: add resize support
// window.addEventListener("resize", onResize, null); // window.addEventListener("resize", onResize, null);
@@ -695,6 +695,6 @@ vimperator.Hints = function () //{{{
// doc = window.content.document; // doc = window.content.document;
// } // }
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -235,6 +235,6 @@ vimperator.IO = function ()
ofstream.close(); ofstream.close();
} }
}; };
} };
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -63,7 +63,7 @@ vimperator.Map = function (modes, cmds, action, extra_info) //{{{
this.cancel_mode = extra_info.cancel_mode || false; this.cancel_mode = extra_info.cancel_mode || false;
this.always_active = extra_info.always_active || false; this.always_active = extra_info.always_active || false;
} }
} };
vimperator.Map.prototype.hasName = function (name) vimperator.Map.prototype.hasName = function (name)
{ {
@@ -74,7 +74,7 @@ vimperator.Map.prototype.hasName = function (name)
} }
return false; return false;
} };
// Since we will add many Map-objects, we add some functions as prototypes // 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 // 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); args.push(argument);
return this.action.apply(this, args); return this.action.apply(this, args);
} };
//}}} //}}}
vimperator.Mappings = function () //{{{ vimperator.Mappings = function () //{{{
@@ -187,19 +187,19 @@ vimperator.Mappings = function () //{{{
this.__iterator__ = function () this.__iterator__ = function ()
{ {
return mappingsIterator(vimperator.modes.NORMAL, main); return mappingsIterator(vimperator.modes.NORMAL, main);
} };
// FIXME // FIXME
this.getIterator = function (mode) this.getIterator = function (mode)
{ {
return mappingsIterator(mode, main); return mappingsIterator(mode, main);
} };
// FIXME // FIXME
this.getUserIterator = function (mode) this.getUserIterator = function (mode)
{ {
return mappingsIterator(mode, user); return mappingsIterator(mode, user);
} };
this.hasMap = function (mode, cmd) this.hasMap = function (mode, cmd)
{ {
@@ -212,7 +212,7 @@ vimperator.Mappings = function () //{{{
} }
return false; return false;
} };
this.add = function (map) this.add = function (map)
{ {
@@ -226,17 +226,17 @@ vimperator.Mappings = function () //{{{
for (var k = 0; k < map.modes.length; k++) for (var k = 0; k < map.modes.length; k++)
user[map.modes[k]].push(map); user[map.modes[k]].push(map);
} };
this.remove = function (mode, cmd) this.remove = function (mode, cmd)
{ {
removeMap(mode, cmd); removeMap(mode, cmd);
} };
this.removeAll = function (mode) this.removeAll = function (mode)
{ {
user[mode] = []; user[mode] = [];
} };
this.get = function (mode, cmd) this.get = function (mode, cmd)
{ {
@@ -246,13 +246,13 @@ vimperator.Mappings = function () //{{{
map = getMap(mode, cmd, main); map = getMap(mode, cmd, main);
return map; return map;
} };
// TODO: move default maps to their own v.normal namespace // TODO: move default maps to their own v.normal namespace
this.getDefaultMap = function (mode, cmd) this.getDefaultMap = function (mode, cmd)
{ {
return getMap(mode, cmd, main); return getMap(mode, cmd, main);
} };
// returns an array of mappings with names which start with "cmd" // returns an array of mappings with names which start with "cmd"
this.getCandidates = function (mode, cmd) this.getCandidates = function (mode, cmd)
@@ -277,7 +277,7 @@ vimperator.Mappings = function () //{{{
} }
return matches; return matches;
} };
this.list = function (mode, filter) this.list = function (mode, filter)
{ {
@@ -297,14 +297,14 @@ vimperator.Mappings = function () //{{{
list += "<tr>"; list += "<tr>";
list += "<td> " + vimperator.util.escapeHTML(maps[i].names[j]) + "</td>"; list += "<td> " + vimperator.util.escapeHTML(maps[i].names[j]) + "</td>";
if (maps[i].rhs) if (maps[i].rhs)
list += "<td> " + vimperator.util.escapeHTML(maps[i].rhs) + "</td>" list += "<td> " + vimperator.util.escapeHTML(maps[i].rhs) + "</td>";
list += "</tr>"; list += "</tr>";
} }
} }
list += "</table>"; list += "</table>";
vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE); vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE);
} };
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// DEFAULT MAPPINGS //////////////////////////////////////// ////////////////////// DEFAULT MAPPINGS ////////////////////////////////////////
@@ -2014,6 +2014,6 @@ vimperator.Mappings = function () //{{{
//}}} //}}}
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -104,7 +104,7 @@ vimperator.Option = function (names, type, extra_info) //{{{
return true; return true;
} }
return false; return false;
} };
this.isValidValue = function (value) this.isValidValue = function (value)
{ {
@@ -112,13 +112,13 @@ vimperator.Option = function (names, type, extra_info) //{{{
return this.validator(value); return this.validator(value);
else else
return true; return true;
} };
this.reset = function () this.reset = function ()
{ {
this.value = this.default_value; this.value = this.default_value;
} };
} //}}} }; //}}}
vimperator.Options = function () //{{{ vimperator.Options = function () //{{{
{ {
@@ -315,7 +315,7 @@ vimperator.Options = function () //{{{
this.__iterator__ = function () this.__iterator__ = function ()
{ {
return optionsIterator(); return optionsIterator();
} };
this.get = function (name) this.get = function (name)
{ {
@@ -325,14 +325,14 @@ vimperator.Options = function () //{{{
return options[i]; return options[i];
} }
return null; return null;
} };
this.add = function (option) this.add = function (option)
{ {
this.__defineGetter__(option.name, function () { return option.value; }); this.__defineGetter__(option.name, function () { return option.value; });
this.__defineSetter__(option.name, function (value) { option.value = value; }); this.__defineSetter__(option.name, function (value) { option.value = value; });
options.push(option); options.push(option);
} };
this.destroy = function () this.destroy = function ()
{ {
@@ -340,7 +340,7 @@ vimperator.Options = function () //{{{
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") == 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) this.list = function (only_non_default)
{ {
@@ -382,7 +382,7 @@ vimperator.Options = function () //{{{
list += "</table>"; list += "</table>";
vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE); 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 hack is only needed, because we need to do asynchronous loading of the .vimperatorrc
this.setInitialGUI = function () this.setInitialGUI = function ()
@@ -393,29 +393,29 @@ vimperator.Options = function () //{{{
this.get("laststatus").reset(); this.get("laststatus").reset();
if (!showtabline_done) if (!showtabline_done)
this.get("showtabline").reset(); this.get("showtabline").reset();
} };
// TODO: separate Preferences from Options? Would these utility functions // TODO: separate Preferences from Options? Would these utility functions
// be better placed in the 'core' vimperator namespace somewhere? // be better placed in the 'core' vimperator namespace somewhere?
this.setPref = function (name, value) this.setPref = function (name, value)
{ {
return storePreference(name, value, true); return storePreference(name, value, true);
} };
this.getPref = function (name, forced_default) this.getPref = function (name, forced_default)
{ {
return loadPreference(name, forced_default, true); return loadPreference(name, forced_default, true);
} };
this.setFirefoxPref = function (name, value) this.setFirefoxPref = function (name, value)
{ {
return storePreference(name, value); return storePreference(name, value);
} };
this.getFirefoxPref = function (name, forced_default) this.getFirefoxPref = function (name, forced_default)
{ {
return loadPreference(name, forced_default); return loadPreference(name, forced_default);
} };
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// DEFAULT OPTIONS ///////////////////////////////////////// ////////////////////// 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'] | " + 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 | " + "//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:*[@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", this.add(new vimperator.Option(["activate", "act"], "stringlist",
{ {
@@ -608,7 +608,7 @@ vimperator.Options = function () //{{{
"</ul>" + "</ul>" +
"The order matters", "The order matters",
default_value: "gfm", 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", this.add(new vimperator.Option(["popups", "pps"], "number",
@@ -779,6 +779,6 @@ vimperator.Options = function () //{{{
setTitleString(this.titlestring); setTitleString(this.titlestring);
setPopups(this.popups); setPopups(this.popups);
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -101,12 +101,12 @@ vimperator.Tabs = function () //{{{
} }
return getBrowser().tabContainer.selectedIndex; return getBrowser().tabContainer.selectedIndex;
} };
this.count = function () this.count = function ()
{ {
return getBrowser().mTabs.length; return getBrowser().mTabs.length;
} };
// TODO: implement filter // TODO: implement filter
// @returns an array of tabs which match filter // @returns an array of tabs which match filter
@@ -122,7 +122,7 @@ vimperator.Tabs = function () //{{{
buffers.push([number, title, uri]); buffers.push([number, title, uri]);
} }
return buffers; return buffers;
} };
this.getTab = function (index) this.getTab = function (index)
{ {
@@ -130,7 +130,7 @@ vimperator.Tabs = function () //{{{
return getBrowser().mTabs[index]; return getBrowser().mTabs[index];
return getBrowser().tabContainer.selectedItem; return getBrowser().tabContainer.selectedItem;
} };
/* spec == "" moves the tab to the last position as per Vim /* 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 * 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); var index = indexFromSpec(spec, wrap);
getBrowser().moveTabTo(tab, index); getBrowser().moveTabTo(tab, index);
} };
/* quit_on_last_tab = 1: quit without saving session /* quit_on_last_tab = 1: quit without saving session
* quit_on_last_tab = 2: quit and save session * quit_on_last_tab = 2: quit and save session
@@ -201,12 +201,12 @@ vimperator.Tabs = function () //{{{
for (; i >= index; i--) for (; i >= index; i--)
removeOrBlankTab(this.getTab(i)); removeOrBlankTab(this.getTab(i));
} }
} };
this.keepOnly = function (tab) this.keepOnly = function (tab)
{ {
getBrowser().removeAllTabsBut(tab); getBrowser().removeAllTabsBut(tab);
} };
this.select = function (spec, wrap) this.select = function (spec, wrap)
{ {
@@ -217,7 +217,7 @@ vimperator.Tabs = function () //{{{
return false; return false;
} }
getBrowser().mTabContainer.selectedIndex = index; getBrowser().mTabContainer.selectedIndex = index;
} };
// TODO: when restarting a session FF selects the first tab and then the // 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 // 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]]; alternates = [this.getTab(), alternates[0]];
this.alternate = alternates[1]; this.alternate = alternates[1];
} };
// TODO: move to v.buffers // TODO: move to v.buffers
this.alternate = this.getTab(); this.alternate = this.getTab();
@@ -244,7 +244,7 @@ vimperator.Tabs = function () //{{{
{ {
getBrowser().reloadTab(tab); getBrowser().reloadTab(tab);
} }
} };
this.reloadAll = function (bypass_cache) this.reloadAll = function (bypass_cache)
{ {
@@ -254,7 +254,7 @@ vimperator.Tabs = function () //{{{
{ {
try try
{ {
this.reload(getBrowser().mTabs[i], bypass_cache) this.reload(getBrowser().mTabs[i], bypass_cache);
} }
catch (e) catch (e)
{ {
@@ -267,8 +267,8 @@ vimperator.Tabs = function () //{{{
{ {
getBrowser().reloadAllTabs(); getBrowser().reloadAllTabs();
} }
} };
//}}} //}}}
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -838,7 +838,7 @@ vimperator.CommandLine = function () //{{{
}; };
//}}} //}}}
} //}}} }; //}}}
/** /**
* The list which is used for the completion box, the preview window and the buffer preview window * 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 () //{{{ vimperator.StatusLine = function () //{{{
{ {
@@ -1135,7 +1135,7 @@ vimperator.StatusLine = function () //{{{
modified += "-"; modified += "-";
if (modified) if (modified)
url += " [" + modified + "]" url += " [" + modified + "]";
url_widget.value = url; url_widget.value = url;
}, },
@@ -1211,6 +1211,6 @@ vimperator.StatusLine = function () //{{{
}; };
//}}} //}}}
} //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -182,10 +182,10 @@ vimperator.util = {
strNum[0] = strNum[0].substring(0, u) + "," + strNum[0].substring(u, strNum[0].length); strNum[0] = strNum[0].substring(0, u) + "," + strNum[0].substring(u, strNum[0].length);
if (strNum[1]) if (strNum[1])
strNum[0] += "." + strNum[1] strNum[0] += "." + strNum[1];
return strNum[0]; return strNum[0];
} }
} };
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -753,7 +753,7 @@ const vimperator = (function () //{{{
thread.dispatch(new CallbackEvent(func, args), thread.DISPATCH_SYNC); thread.dispatch(new CallbackEvent(func, args), thread.DISPATCH_SYNC);
} }
} //}}} }; //}}}
})(); //}}} })(); //}}}
// called when the chrome is fully loaded and before the main window is shown // called when the chrome is fully loaded and before the main window is shown