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

Add missing semicolons.

This commit is contained in:
Doug Kearns
2009-06-02 16:56:28 +10:00
parent 95dffaf95a
commit 6d7b94daa6
17 changed files with 56 additions and 55 deletions

View File

@@ -334,7 +334,7 @@ function Buffer() //{{{
if (util.newURI(buffer.URL).scheme == scheme)
liberator.open(buffer.URL.substr(scheme.length + 1));
else
liberator.open(scheme + ":" + buffer.URL)
liberator.open(scheme + ":" + buffer.URL);
});
mappings.add(myModes, ["gi"],

View File

@@ -1047,7 +1047,7 @@ function Commands() //{{{
return undefined;
}
return completer.apply(this, Array.slice(arguments));
}
};
}
else
completeFunc = completion[completeOptionMap[completeOpt]];

View File

@@ -109,7 +109,7 @@ const configbase = { //{{{
* application namespaces which should be loaded before liberator
* initialization.
*/
scripts: [],
scripts: []
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -419,7 +419,7 @@ function Editor() //{{{
mappings.add([modes.VISUAL],
["v"], "End visual mode",
function (count) { events.onEscape() });
function (count) { events.onEscape(); });
mappings.add([modes.TEXTAREA],
["V"], "Start visual line mode",
@@ -601,7 +601,8 @@ function Editor() //{{{
{
let elem = liberator.focus;
// A error occurs if the element has been removed when "elem.selectionStart" is executed.
try {
try
{
if (elem && elem.selectionEnd)
elem.selectionEnd = elem.selectionStart;
}

View File

@@ -431,7 +431,7 @@ function Events() //{{{
return: ["Return", "CR", "Enter"],
right_shift: [">"],
space: ["Space", " "],
subtract: ["Minus", "Subtract"],
subtract: ["Minus", "Subtract"]
};
const code_key = {};
@@ -874,7 +874,7 @@ function Events() //{{{
if (keyname)
{
modifier = modifier.toUpperCase();
key = [k + "-" for ([i, k] in Iterator("CASM")) if (modifier.indexOf(k + "-") >= 0)]
key = [k + "-" for ([i, k] in Iterator("CASM")) if (modifier.indexOf(k + "-") >= 0)];
keyCode = key_code[keyname];
let c = String.fromCharCode(keyCode);
@@ -927,7 +927,7 @@ function Events() //{{{
{
let charCode = key.charCodeAt(0);
let keyCode = 0;
let [shift, ctrl, alt, meta] = [false, false, false, false]
let [shift, ctrl, alt, meta] = [false, false, false, false];
let string = null;
if (key[0] == "<")

View File

@@ -223,7 +223,7 @@ function Finder() //{{{
var parent = before.parentNode;
aNode.appendChild(docfrag);
parent.insertBefore(aNode, before);
this.spans.push(aNode)
this.spans.push(aNode);
return aNode;
},
@@ -236,17 +236,17 @@ function Finder() //{{{
{
if (span.parentNode)
{
let el = span.firstChild
let el = span.firstChild;
while (el)
{
span.removeChild(el)
span.parentNode.insertBefore(el, span)
span.removeChild(el);
span.parentNode.insertBefore(el, span);
el = span.firstChild;
}
span.parentNode.removeChild(span);
}
})
this.spans = []
});
this.spans = [];
},
getSpans: function (doc) this.spans
@@ -318,7 +318,7 @@ function Finder() //{{{
let word = buffer.getCurrentWord();
// A hacky way to move after the current match before searching forwards
window.content.getSelection().getRangeAt(0).collapse(false);
finder.onSubmit(word, false)
finder.onSubmit(word, false);
});
mappings.add(myModes.concat([modes.CARET, modes.TEXTAREA]), ["#"],
@@ -329,7 +329,7 @@ function Finder() //{{{
let word = buffer.getCurrentWord();
// A hacky way to move before the current match before searching backwards
window.content.getSelection().getRangeAt(0).collapse(true);
finder.onSubmit(word, true)
finder.onSubmit(word, true);
});
/////////////////////////////////////////////////////////////////////////////}}}
@@ -519,7 +519,7 @@ function Finder() //{{{
*/
clear: function ()
{
highlightObj.clear()
highlightObj.clear();
}
};
//}}}

View File

@@ -161,7 +161,7 @@ function Hints() //{{{
let type = elem.type ? elem.type.toLowerCase() : "";
if (tagname == "input" && (type == "submit" || type == "button" || type == "reset"))
return [elem.value, false]
return [elem.value, false];
else
{
for each (let option in options["hintinputs"].split(","))
@@ -171,18 +171,18 @@ function Hints() //{{{
if (tagname == "select")
{
if (elem.selectedIndex >= 0)
return [elem.item(elem.selectedIndex).text.toLowerCase(), false]
return [elem.item(elem.selectedIndex).text.toLowerCase(), false];
}
else if (type == "image")
{
if (elem.alt)
return [elem.alt.toLowerCase(), true]
return [elem.alt.toLowerCase(), true];
}
else if (elem.value && type != "password")
{
// radio's and checkboxes often use internal ids as values - maybe make this an option too...
if (! ((type == "radio" || type == "checkbox") && !isNaN(elem.value)))
return [elem.value.toLowerCase(), (type == "radio" || type == "checkbox")]
return [elem.value.toLowerCase(), (type == "radio" || type == "checkbox")];
}
}
else if (option == "label")
@@ -192,14 +192,14 @@ function Hints() //{{{
//TODO: (possibly) do some guess work for label-like objects
let label = buffer.evaluateXPath("//label[@for='" + elem.id + "']", doc).snapshotItem(0);
if (label)
return [label.textContent.toLowerCase(), true]
return [label.textContent.toLowerCase(), true];
}
}
else if (option == "name")
return [elem.name.toLowerCase(), true]
return [elem.name.toLowerCase(), true];
}
}
return ["", false]
return ["", false];
}
/**
@@ -266,11 +266,11 @@ function Hints() //{{{
// If we found a satisfactory offset, let's use it.
if (curdist < Infinity)
return [leftpos + curleft, toppos + curtop]
return [leftpos + curleft, toppos + curtop];
}
}
catch (e) {} //badly formed document, or shape == "default" in which case we don't move the hint
return [leftpos, toppos]
return [leftpos, toppos];
}
/**
@@ -674,7 +674,7 @@ function Hints() //{{{
let beyondLastWord = (nextWordIdx == words.length);
let charMatched = false;
if (beyondLastWord == false)
charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping)
charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping);
if (charMatched)
return true;
@@ -874,7 +874,7 @@ function Hints() //{{{
context.compare = function () 0;
context.completions = [[k, v.prompt] for ([k, v] in Iterator(hintModes))];
},
onChange: function () { modes.pop() },
onChange: function () { modes.pop(); },
onCancel: function (arg) { arg && setTimeout(function () hints.show(arg), 0); }
});
}, { flags: Mappings.flags.COUNT });

View File

@@ -56,6 +56,6 @@
prefix.unshift("chrome://" + modules.config.name.toLowerCase() + "/content/");
modules.config.scripts.forEach(load);
})()
})();
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -307,12 +307,12 @@ function Mappings() //{{{
null,
function (context, obj, args)
{
let mode = args[0]
let mode = args[0];
return util.Array.flatten(
[
[[name, map.description] for ([i, name] in Iterator(map.names))]
for ([i, map] in Iterator(user[mode].concat(main[mode])))
])
]);
}
]);
});

View File

@@ -288,7 +288,7 @@ const modes = (function () //{{{
self.addMode("LINE", true); // linewise visual mode
self.addMode("PROMPT", true);
config.modes.forEach(function (mode) { self.addMode.apply(self, mode) });
config.modes.forEach(function (mode) { self.addMode.apply(self, mode); });
return self;
//}}}

View File

@@ -27,7 +27,7 @@ function Services()
ifaces = Array.concat(ifaces);
try
{
let res = Cc[classes][meth || "getService"](ifaces.shift())
let res = Cc[classes][meth || "getService"](ifaces.shift());
ifaces.forEach(function (iface) res.QueryInterface(iface));
return res;
}

View File

@@ -472,7 +472,7 @@ function CommandLine() //{{{
}
// Fallthrough
case "full":
this.select(reverse ? this.UP : this.DOWN)
this.select(reverse ? this.UP : this.DOWN);
break;
}
@@ -1765,7 +1765,7 @@ function ItemList(id) //{{{
div.style.minWidth = "";
// FIXME: Belongs elsewhere.
commandline.updateOutputHeight(false);
setTimeout(function () { container.height -= commandline.getSpaceNeeded() }, 0)
setTimeout(function () { container.height -= commandline.getSpaceNeeded() }, 0);
}
function getCompletion(index) completionElements.snapshotItem(index - startIndex);
@@ -1847,7 +1847,7 @@ function ItemList(id) //{{{
return;
haveCompletions = true;
let root = nodes.root
let root = nodes.root;
let items = nodes.items;
let [start, end, waiting] = getRows(context);
@@ -1883,9 +1883,9 @@ function ItemList(id) //{{{
return;
nodes.up.style.opacity = (start == 0) ? "0" : "1";
if (end != context.items.length)
nodes.down.style.display = "block"
nodes.down.style.display = "block";
else
nodes.up.style.display = "block"
nodes.up.style.display = "block";
});
divNodes.noCompletions.style.display = haveCompletions ? "none" : "block";

View File

@@ -334,8 +334,8 @@ const util = { //{{{
{
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4)
callback(xmlhttp)
}
callback(xmlhttp);
};
}
xmlhttp.open("GET", url, !!callback);
xmlhttp.send(null);
@@ -442,7 +442,7 @@ const util = { //{{{
const NAMESPACES = util.Array.toObject([
[NS, 'liberator'],
[XHTML, 'html'],
[XUL, 'xul'],
[XUL, 'xul']
]);
if (object instanceof Node && !(object instanceof Document))
{
@@ -735,7 +735,7 @@ util.Array.isinstance = function isinstance(obj) {
util.Array.toObject = function toObject(assoc)
{
let obj = {};
assoc.forEach(function ([k, v]) { obj[k] = v });
assoc.forEach(function ([k, v]) { obj[k] = v; });
return obj;
};
@@ -857,7 +857,7 @@ Struct.prototype = {
let self = this;
return ([v, self[v]] for ([k, v] in Iterator(self.members)))
}
}
};
// Add no-sideeffect array methods. Can't set new Array() as the prototype or
// get length() won't work.

View File

@@ -259,7 +259,7 @@ function Bookmarks() //{{{
{
completer: function completer(context)
{
completion.search(context, true)
completion.search(context, true);
context.completions = [["", "Don't perform searches by default"]].concat(context.completions);
},
validator: Option.validateCompleter

View File

@@ -131,13 +131,13 @@ const config = { //{{{
"<Return>": modes.NORMAL | modes.INSERT,
"<Space>": modes.NORMAL | modes.INSERT,
"<Up>": modes.NORMAL | modes.INSERT,
"<Down>": modes.NORMAL | modes.INSERT,
}
"<Down>": modes.NORMAL | modes.INSERT
};
},
scripts: [
"bookmarks.js",
"tabs.js",
"tabs.js"
],
init: function ()
@@ -369,8 +369,8 @@ const config = { //{{{
"Redraw the screen",
function ()
{
let wu = window.QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIDOMWindowUtils);
let wu = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
wu.redraw();
modes.show();
},

View File

@@ -257,7 +257,7 @@ function Bookmarks() //{{{
{
completer: function completer(context)
{
completion.search(context, true)
completion.search(context, true);
context.completions = [["", "Don't perform searches by default"]].concat(context.completions);
},
validator: Option.validateCompleter

View File

@@ -174,8 +174,8 @@ const config = { //{{{
"<Return>": modes.NORMAL | modes.INSERT,
"<Space>": modes.NORMAL | modes.INSERT,
"<Up>": modes.NORMAL | modes.INSERT,
"<Down>": modes.NORMAL | modes.INSERT,
}
"<Down>": modes.NORMAL | modes.INSERT
};
},
scripts: [
@@ -504,7 +504,7 @@ const config = { //{{{
let arg = args.literalArg;
if (arg in displayPanes)
openDisplayPane(displayPanes[arg])
openDisplayPane(displayPanes[arg]);
// TODO: focus when we have better key handling of these extended modes
else
liberator.echoerr("E475: Invalid argument: " + arg);
@@ -567,11 +567,11 @@ const config = { //{{{
// functions to make porting from FF as simple as possible.
window.toJavaScriptConsole = function () {
toOpenWindowByType("global:console", "chrome://global/content/console.xul");
}
};
window.BrowserStop = function () {
SBGetBrowser().mCurrentBrowser.stop();
}
};
}
}; //}}}