Skip to content

Commit 13056b5

Browse files
committed
Remove unecessery semicolons (#515)
1 parent a2e4a4f commit 13056b5

File tree

16 files changed

+36
-36
lines changed

16 files changed

+36
-36
lines changed

common/components/protocols.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const systemPrincipal = channel.owner;
3030
channel.cancel(NS_BINDING_ABORTED);
3131
delete channel;
3232

33-
function dataURL(type, data) "data:" + (type || "application/xml;encoding=UTF-8") + "," + encodeURIComponent(data);
33+
function dataURL(type, data) "data:" + (type || "application/xml;encoding=UTF-8") + "," + encodeURIComponent(data)
3434
function makeChannel(url, orig) {
3535
if (typeof url == "function")
3636
url = dataURL.apply(null, url());
@@ -40,7 +40,7 @@ function makeChannel(url, orig) {
4040
channel.originalURI = orig;
4141
return channel;
4242
}
43-
function fakeChannel(orig) makeChannel("chrome://liberator/content/does/not/exist", orig);
43+
function fakeChannel(orig) makeChannel("chrome://liberator/content/does/not/exist", orig)
4444
function redirect(to, orig) {
4545
//xxx: escape
4646
let html = '<html><head><meta http-equiv="Refresh" content="' + ("0;" + to).replace(/"/g, "&quot;") + '"/></head></html>';
@@ -161,6 +161,6 @@ var components = [ChromeData, Liberator];
161161
if(XPCOMUtils.generateNSGetFactory)
162162
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
163163
else
164-
function NSGetModule(compMgr, fileSpec) XPCOMUtils.generateModule(components);
164+
function NSGetModule(compMgr, fileSpec) XPCOMUtils.generateModule(components)
165165

166166
// vim: set fdm=marker sw=4 ts=4 et:

common/content/base.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function curry(fn, length, self, acc) {
184184
return fn;
185185

186186
// Close over function with 'this'
187-
function close(self, fn) function () fn.apply(self, Array.slice(arguments));
187+
function close(self, fn) function () fn.apply(self, Array.slice(arguments))
188188

189189
if (acc == null)
190190
acc = [];
@@ -366,7 +366,7 @@ Class.prototype = {
366366
*/
367367
setTimeout: function (callback, timeout) {
368368
const self = this;
369-
function target() callback.call(self);
369+
function target() callback.call(self)
370370
return window.setTimeout(target, timeout);
371371
}
372372
};

common/content/commandline.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ const CommandLine = Module("commandline", {
306306
liberator.triggerObserver("echoLine", str, highlightGroup, forceSingle);
307307

308308
//if (!this._commandShown())
309-
;//commandline.hide();
309+
//commandline.hide();
310310

311311
/*let field = this._messageBox.inputField;
312312
if (!forceSingle && field.editor.rootElement.scrollWidth > field.scrollWidth)
@@ -1370,7 +1370,7 @@ const CommandLine = Module("commandline", {
13701370
try {
13711371
this.waiting = true;
13721372
for (let context of list) {
1373-
function done() !(idx >= n + context.items.length || idx == -2 && !context.items.length);
1373+
function done() !(idx >= n + context.items.length || idx == -2 && !context.items.length)
13741374
while (context.incomplete && !done())
13751375
liberator.threadYield(false, true);
13761376

@@ -1799,7 +1799,7 @@ const ItemList = Class("ItemList", {
17991799
let off = 0;
18001800
let end = this._startIndex + options.maxitems;
18011801
function getRows(context) {
1802-
function fix(n) util.Math.constrain(n, 0, len);
1802+
function fix(n) util.Math.constrain(n, 0, len)
18031803
let len = context.items.length;
18041804
let start = off;
18051805
end -= !!context.message + context.incomplete;

common/content/commands.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ const Commands = Module("commands", {
381381
*/
382382
commandToString: function (args) {
383383
let res = [args.command + (args.bang ? "!" : "")];
384-
function quote(str) Commands.quoteArg[/[\s"'\\]|^$/.test(str) ? '"' : ""](str);
384+
function quote(str) Commands.quoteArg[/[\s"'\\]|^$/.test(str) ? '"' : ""](str)
385385

386386
for (let [opt, val] in Iterator(args.options || {})) {
387387
let chr = /^-.$/.test(opt) ? " " : "=";
@@ -1214,9 +1214,9 @@ const Commands = Module("commands", {
12141214
function quote(q, list) {
12151215
let re = RegExp("[" + list + "]", "g");
12161216
return function (str) q + String.replace(str, re, function ($0) $0 in Commands.quoteMap ? Commands.quoteMap[$0] : ("\\" + $0)) + q;
1217-
};
1217+
}
12181218
function vimSingleQuote(s)
1219-
s.replace(/'/g, "''");
1219+
s.replace(/'/g, "''")
12201220
Commands.complQuote = { // FIXME
12211221
'"': ['"', quote("", '\n\t"\\\\'), '"'],
12221222
"'": ["'", vimSingleQuote, "'"],

common/content/hints.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const Hints = Module("hints", {
3333

3434
const Mode = Hints.Mode;
3535
Mode.defaultValue("tags", function () function () options.hinttags);
36-
function extended() options.extendedhinttags;
37-
function images() "//*[@src]";
38-
function anchors() "//*[@id or @name]";
36+
function extended() options.extendedhinttags
37+
function images() "//*[@src]"
38+
function anchors() "//*[@id or @name]"
3939

4040
this._hintModes = {
4141
";": Mode("Focus hint", function (elem) buffer.focusElement(elem), extended),
@@ -698,7 +698,7 @@ const Hints = Module("hints", {
698698
* @param {string} str The string to split.
699699
* @returns {Array(string)} The lowercased splits of the splitting.
700700
*/
701-
function tokenize(pat, str) str.split(pat).map(String.toLowerCase);
701+
function tokenize(pat, str) str.split(pat).map(String.toLowerCase)
702702

703703
/**
704704
* Get a hint matcher for hintmatching=contains

common/content/io.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ const File = Class("File", {
254254
!liberator.has("Windows") ? /\$(\w+)\b|\${(\w+)}/g
255255
: /\$(\w+)\b|\${(\w+)}|%(\w+)%/g,
256256
function (m, n1, n2, n3) services.get("environment").get(n1 || n2 || n3) || m
257-
);
257+
)
258258
path = expand(path);
259259

260260
// expand ~
@@ -770,7 +770,7 @@ lookup:
770770
system: function (command, input) {
771771
liberator.echomsg("Executing: " + command);
772772

773-
function escape(str) '"' + str.replace(/[\\"$]/g, "\\$&") + '"';
773+
function escape(str) '"' + str.replace(/[\\"$]/g, "\\$&") + '"'
774774

775775
return this.withTempFiles(function (stdin, stdout, cmd) {
776776
if (input)

common/content/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ const JavaScript = Module("javascript", {
383383
// Constants are unsorted, and appear before other non-null strings.
384384
// Other strings are sorted in the default manner.
385385
let compare = context.compare;
386-
function isnan(item) item != '' && isNaN(item);
386+
function isnan(item) item != '' && isNaN(item)
387387
context.compare = function (a, b) {
388388
if (!isnan(a.item.key) && !isnan(b.item.key))
389389
return a.item.key - b.item.key;

common/content/liberator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ const Liberator = Module("liberator", {
512512
let items = completion._runCompleter("help", topic, null, unchunked).items;
513513
let partialMatch = null;
514514

515-
function format(item) item.description + "#" + encodeURIComponent(item.text);
515+
function format(item) item.description + "#" + encodeURIComponent(item.text)
516516

517517
for (let item of items) {
518518
if (item.text == topic)
@@ -1470,7 +1470,7 @@ const Liberator = Module("liberator", {
14701470
e.original.uninstall();
14711471
else
14721472
e.original.userDisabled = command.action == "disableItem";
1473-
};
1473+
}
14741474

14751475
if (args.bang)
14761476
liberator.extensions.forEach(function (e) { action(e); });

common/content/mappings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const Map = Class("Map", {
116116
args.push(argument);
117117

118118
let self = this;
119-
function repeat() self.action.apply(self, args);
119+
function repeat() self.action.apply(self, args)
120120
if (this.names[0] != ".") // FIXME: Kludge.
121121
mappings.repeat = repeat;
122122

common/content/modules.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Module.constructors = {};
6969
window.addEventListener("load", function onload() {
7070
window.removeEventListener("load", onload, false);
7171

72-
function dump(str) window.dump(String.replace(str, /\n?$/, "\n").replace(/^/m, Config.prototype.name.toLowerCase() + ": "));
72+
function dump(str) window.dump(String.replace(str, /\n?$/, "\n").replace(/^/m, Config.prototype.name.toLowerCase() + ": "))
7373
const start = Date.now();
7474
const deferredInit = { load: [] };
7575
const seen = new Set();
@@ -91,7 +91,7 @@ window.addEventListener("load", function onload() {
9191
loaded.push(module.name);
9292

9393
function init(mod, module)
94-
function () module.INIT[mod].call(modules[module.name], modules[mod]);
94+
function () module.INIT[mod].call(modules[module.name], modules[mod])
9595
for (let mod of loaded) {
9696
try {
9797
if (mod in module.INIT)

0 commit comments

Comments
 (0)