summaryrefslogtreecommitdiff
path: root/common/content
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2009-06-02 16:56:28 +1000
committerDoug Kearns <dougkearns@gmail.com>2009-06-02 16:59:24 +1000
commit6d7b94daa6e940fd1f95ead45b9a247670d22d54 (patch)
treef39522d54dc6a307e2d1cca6ac30a198d02f93b9 /common/content
parent95dffaf95a3653e55a34e090b800f9a79e9a8fd5 (diff)
downloadpentadactyl-6d7b94daa6e940fd1f95ead45b9a247670d22d54.tar.gz
Add missing semicolons.
Diffstat (limited to 'common/content')
-rw-r--r--common/content/buffer.js2
-rw-r--r--common/content/commands.js2
-rw-r--r--common/content/configbase.js2
-rw-r--r--common/content/editor.js5
-rw-r--r--common/content/events.js6
-rw-r--r--common/content/finder.js18
-rw-r--r--common/content/hints.js22
-rw-r--r--common/content/liberator-overlay.js2
-rw-r--r--common/content/mappings.js4
-rw-r--r--common/content/modes.js2
-rw-r--r--common/content/services.js2
-rw-r--r--common/content/ui.js10
-rw-r--r--common/content/util.js10
13 files changed, 44 insertions, 43 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js
index ac10e134..e1387005 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -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"],
diff --git a/common/content/commands.js b/common/content/commands.js
index f2505d4b..69ada697 100644
--- a/common/content/commands.js
+++ b/common/content/commands.js
@@ -1047,7 +1047,7 @@ function Commands() //{{{
return undefined;
}
return completer.apply(this, Array.slice(arguments));
- }
+ };
}
else
completeFunc = completion[completeOptionMap[completeOpt]];
diff --git a/common/content/configbase.js b/common/content/configbase.js
index dd0f9b65..fbf84810 100644
--- a/common/content/configbase.js
+++ b/common/content/configbase.js
@@ -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:
diff --git a/common/content/editor.js b/common/content/editor.js
index 2dd1a1cc..a3f0c5e3 100644
--- a/common/content/editor.js
+++ b/common/content/editor.js
@@ -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;
}
diff --git a/common/content/events.js b/common/content/events.js
index 1baa8963..97237af3 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -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] == "<")
diff --git a/common/content/finder.js b/common/content/finder.js
index 33494d49..843bb1c6 100644
--- a/common/content/finder.js
+++ b/common/content/finder.js
@@ -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();
}
};
//}}}
diff --git a/common/content/hints.js b/common/content/hints.js
index 1a0a4c5d..23ddda09 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -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 });
diff --git a/common/content/liberator-overlay.js b/common/content/liberator-overlay.js
index 825af270..b2cd0656 100644
--- a/common/content/liberator-overlay.js
+++ b/common/content/liberator-overlay.js
@@ -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:
diff --git a/common/content/mappings.js b/common/content/mappings.js
index b5c62719..e1a3e64e 100644
--- a/common/content/mappings.js
+++ b/common/content/mappings.js
@@ -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])))
- ])
+ ]);
}
]);
});
diff --git a/common/content/modes.js b/common/content/modes.js
index 8f7bd41b..ed3798d9 100644
--- a/common/content/modes.js
+++ b/common/content/modes.js
@@ -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;
//}}}
diff --git a/common/content/services.js b/common/content/services.js
index d6d3b775..15e20a0d 100644
--- a/common/content/services.js
+++ b/common/content/services.js
@@ -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;
}
diff --git a/common/content/ui.js b/common/content/ui.js
index 0ed9799e..64a01608 100644
--- a/common/content/ui.js
+++ b/common/content/ui.js
@@ -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";
diff --git a/common/content/util.js b/common/content/util.js
index bc17ee18..06875e2a 100644
--- a/common/content/util.js
+++ b/common/content/util.js
@@ -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.