mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 16:07:59 +01:00
add missing semicolons
This commit is contained in:
@@ -120,7 +120,7 @@ Command.prototype = {
|
||||
if (matches && matches[2])
|
||||
{
|
||||
commandline.inputMultiline(new RegExp("^" + matches[2] + "$", "m"),
|
||||
function (args) { exec(matches[1] + "\n" + args) });
|
||||
function (args) { exec(matches[1] + "\n" + args); });
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ function Commands() //{{{
|
||||
const quoteMap = {
|
||||
"\n": "n",
|
||||
"\t": "t"
|
||||
}
|
||||
};
|
||||
function quote(q, list)
|
||||
{
|
||||
let re = RegExp("[" + list + "]", "g");
|
||||
@@ -184,7 +184,7 @@ function Commands() //{{{
|
||||
'"': quote('"', '\n\t"\\\\'),
|
||||
"'": quote("'", "\\\\'"),
|
||||
"": quote("", "\\\\ ")
|
||||
}
|
||||
};
|
||||
|
||||
const ArgType = new Struct("description", "parse");
|
||||
const argTypes = [
|
||||
@@ -555,7 +555,7 @@ function Commands() //{{{
|
||||
if (complete)
|
||||
{
|
||||
if (argCount == "0" || args.length > 0 && (/[1?]/.test(argCount)))
|
||||
complete.highlight(i, sub.length, "SPELLCHECK")
|
||||
complete.highlight(i, sub.length, "SPELLCHECK");
|
||||
}
|
||||
|
||||
if (args.length == literal)
|
||||
|
||||
@@ -857,7 +857,7 @@ function Editor() //{{{
|
||||
editor.selection.deleteFromDocument();
|
||||
editor.insertText(val);
|
||||
}
|
||||
}, this)
|
||||
}, this);
|
||||
if (res == false)
|
||||
throw "Couldn't create temporary file";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
try { __liberator_eval_result = eval(__liberator_eval_string)
|
||||
try { __liberator_eval_result = eval(__liberator_eval_string);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
||||
@@ -689,7 +689,7 @@ function Events() //{{{
|
||||
|
||||
commands.add(["macros"],
|
||||
"List all macros",
|
||||
function (args) { completion.listCompleter("macro", args[0]) },
|
||||
function (args) { completion.listCompleter("macro", args[0]); },
|
||||
{
|
||||
argCount: "?",
|
||||
completer: function (context) completion.macro(context)
|
||||
@@ -1283,7 +1283,7 @@ function Events() //{{{
|
||||
{
|
||||
events.feedingKeys = false;
|
||||
if (lastMacro)
|
||||
setTimeout(function () { liberator.echomsg("Canceled playback of macro '" + lastMacro + "'") }, 100);
|
||||
setTimeout(function () { liberator.echomsg("Canceled playback of macro '" + lastMacro + "'"); }, 100);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
|
||||
@@ -176,7 +176,7 @@ function Search() //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
var baseNode = <span highlight="Search"/>
|
||||
var baseNode = <span highlight="Search"/>;
|
||||
baseNode = util.xmlToDom(baseNode, window.content.document);
|
||||
|
||||
var body = doc.body;
|
||||
|
||||
@@ -237,7 +237,7 @@ function Hints() //{{{
|
||||
hint[IMGSPAN] = imgspan;
|
||||
span.parentNode.appendChild(imgspan);
|
||||
}
|
||||
setClass(imgspan, activeHint == hintnum)
|
||||
setClass(imgspan, activeHint == hintnum);
|
||||
}
|
||||
|
||||
span.setAttribute("number", hintnum);
|
||||
@@ -289,7 +289,7 @@ function Hints() //{{{
|
||||
|
||||
// animate the disappearance of the first hint
|
||||
if (timeout && firstElem)
|
||||
setTimeout(function () { firstElem.removeAttributeNS(NS.uri, "highlight") }, timeout);
|
||||
setTimeout(function () { firstElem.removeAttributeNS(NS.uri, "highlight"); }, timeout);
|
||||
}
|
||||
styles.removeSheet("hint-positions", null, null, null, true);
|
||||
|
||||
@@ -374,7 +374,7 @@ function Hints() //{{{
|
||||
{
|
||||
linkText = linkText.toLowerCase();
|
||||
return tokens.every(function (token) linkText.indexOf(token) >= 0);
|
||||
}
|
||||
};
|
||||
} //}}}
|
||||
|
||||
function wordStartsWithMatcher(hintString, allowWordOverleaping) //{{{
|
||||
@@ -502,7 +502,7 @@ function Hints() //{{{
|
||||
return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping);
|
||||
else
|
||||
return stringsAtBeginningOfWords(hintStrings, words, allowWordOverleaping);
|
||||
}
|
||||
};
|
||||
} //}}}
|
||||
|
||||
let hintMatching = options["hintmatching"];
|
||||
@@ -584,7 +584,7 @@ function Hints() //{{{
|
||||
function (count)
|
||||
{
|
||||
extendedhintCount = count;
|
||||
commandline.input(";", function (arg) { setTimeout(function () hints.show(arg), 0) },
|
||||
commandline.input(";", function (arg) { setTimeout(function () hints.show(arg), 0); },
|
||||
{
|
||||
promptHighlight: "Normal",
|
||||
completer: function (context)
|
||||
|
||||
@@ -30,7 +30,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
plugins.contexts = {};
|
||||
function Script(file)
|
||||
{
|
||||
let self = plugins.contexts[file.path]
|
||||
let self = plugins.contexts[file.path];
|
||||
if (self)
|
||||
{
|
||||
if (self.onUnload)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
loader.loadSubScript(base + script, modules)
|
||||
loader.loadSubScript(base + script, modules);
|
||||
return;
|
||||
}
|
||||
catch (e)
|
||||
|
||||
@@ -109,7 +109,7 @@ const liberator = (function () //{{{
|
||||
.forEach(function (elem)
|
||||
{
|
||||
if (elem)
|
||||
elem.collapsed = (opts.indexOf(opt) == -1)
|
||||
elem.collapsed = (opts.indexOf(opt) == -1);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ function Option(names, description, type, defaultValue, extraInfo) //{{{
|
||||
}
|
||||
Option.prototype = {
|
||||
get globalvalue() options.store.get(this.name),
|
||||
set globalvalue(val) { options.store.set(this.name, val) },
|
||||
set globalvalue(val) { options.store.set(this.name, val); },
|
||||
|
||||
parseValues: function (value)
|
||||
{
|
||||
@@ -164,8 +164,8 @@ Option.prototype = {
|
||||
if (this.checkHas)
|
||||
test = function (val) values.some(function (value) self.checkHas(value, val));
|
||||
let values = this.values;
|
||||
/* Return whether some argument matches */
|
||||
return Array.some(arguments, function (val) test(val))
|
||||
// return whether some argument matches
|
||||
return Array.some(arguments, function (val) test(val));
|
||||
},
|
||||
|
||||
hasName: function (name) this.names.indexOf(name) >= 0,
|
||||
|
||||
@@ -166,7 +166,7 @@ function Highlights(name, store, serial)
|
||||
return error;
|
||||
style.value = newStyle;
|
||||
highlight[style.class] = style;
|
||||
}
|
||||
};
|
||||
|
||||
this.selector = function (class)
|
||||
{
|
||||
@@ -200,7 +200,7 @@ function Highlights(name, store, serial)
|
||||
if (hl.value == hl.default)
|
||||
this.set(class);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function Styles(name, store, serial)
|
||||
@@ -264,7 +264,7 @@ function Styles(name, store, serial)
|
||||
names[name] = sheet;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
this.findSheets = function (name, filter, css, index, system)
|
||||
{
|
||||
@@ -324,7 +324,7 @@ function Styles(name, store, serial)
|
||||
}
|
||||
}
|
||||
return matches.length;
|
||||
}
|
||||
};
|
||||
|
||||
this.registerSheet = function (uri, doCheckSyntax, reload)
|
||||
{
|
||||
@@ -336,14 +336,14 @@ function Styles(name, store, serial)
|
||||
uri = ios.newURI(uri, null, null);
|
||||
if (reload || !sss.sheetRegistered(uri, sss.USER_SHEET))
|
||||
sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
|
||||
}
|
||||
};
|
||||
|
||||
this.unregisterSheet = function (uri)
|
||||
{
|
||||
uri = ios.newURI(uri, null, null);
|
||||
if (sss.sheetRegistered(uri, sss.USER_SHEET))
|
||||
sss.unregisterSheet(uri, sss.USER_SHEET);
|
||||
}
|
||||
};
|
||||
|
||||
// FIXME
|
||||
this.registerAgentSheet = function (uri)
|
||||
@@ -351,14 +351,14 @@ function Styles(name, store, serial)
|
||||
this.unregisterAgentSheet(uri);
|
||||
uri = ios.newURI(uri, null, null);
|
||||
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
|
||||
}
|
||||
};
|
||||
|
||||
this.unregisterAgentSheet = function (uri)
|
||||
{
|
||||
uri = ios.newURI(uri, null, null);
|
||||
if (sss.sheetRegistered(uri, sss.AGENT_SHEET))
|
||||
sss.unregisterSheet(uri, sss.AGENT_SHEET);
|
||||
}
|
||||
};
|
||||
|
||||
function wrapCSS(sheet)
|
||||
{
|
||||
@@ -425,7 +425,7 @@ function Styles(name, store, serial)
|
||||
if (errors.length)
|
||||
{
|
||||
let err = new Error("", errors[0].sourceName.replace(/^(chrome-data:text\/css,).*/, "$1..."), errors[0].lineNumber);
|
||||
err.name = "CSSError"
|
||||
err.name = "CSSError";
|
||||
err.message = errors.reduce(function (msg, e) msg + "; " + e.lineNumber + ": " + e.errorMessage,
|
||||
errors.shift().errorMessage);
|
||||
err.echoerr = err.fileName + ":" + err.lineNumber + ": " + err.message;
|
||||
@@ -516,7 +516,7 @@ liberator.registerObserver("load_commands", function ()
|
||||
}
|
||||
catch (e) {}
|
||||
context.anchored = false;
|
||||
context.completions = compl.concat([[s, ""] for each (s in styles.sites)])
|
||||
context.completions = compl.concat([[s, ""] for each (s in styles.sites)]);
|
||||
}
|
||||
else if (args.completeArg == 1)
|
||||
{
|
||||
|
||||
@@ -598,7 +598,7 @@ function Tabs() //{{{
|
||||
function (args)
|
||||
{
|
||||
let count = args.count;
|
||||
args = args[0]
|
||||
args = args[0];
|
||||
|
||||
if (count < 1)
|
||||
count = 1;
|
||||
|
||||
@@ -238,7 +238,7 @@ function Bookmarks() //{{{
|
||||
var cache = storage.newObject("bookmark-cache", Cache, false);
|
||||
storage.addObserver("bookmark-cache", bookmarkObserver);
|
||||
liberator.registerObserver("shutdown", function () {
|
||||
storage.removeObserver("bookmark-cache", bookmarkObserver)
|
||||
storage.removeObserver("bookmark-cache", bookmarkObserver);
|
||||
});
|
||||
|
||||
liberator.registerObserver("enter", function () {
|
||||
@@ -358,7 +358,7 @@ function Bookmarks() //{{{
|
||||
if (!args.bang)
|
||||
{
|
||||
context.completions = [[content.document.documentURI, "Current Location"]];
|
||||
return
|
||||
return;
|
||||
}
|
||||
completion.bookmark(context, args["-tags"], { keyword: args["-keyword"], title: args["-title"] });
|
||||
},
|
||||
@@ -784,7 +784,7 @@ function History() //{{{
|
||||
function (args) { history.list(args.join(" "), args.bang, args["-max"] || 1000); },
|
||||
{
|
||||
bang: true,
|
||||
completer: function (context) { context.quote = null, completion.history(context) },
|
||||
completer: function (context) { context.quote = null, completion.history(context); },
|
||||
options: [[["-max", "-m"], options.OPTION_INT]]
|
||||
// completer: function (filter) completion.history(filter)
|
||||
});
|
||||
@@ -823,7 +823,7 @@ function History() //{{{
|
||||
url: node.uri,
|
||||
title: node.title,
|
||||
icon: node.icon ? node.icon.spec : DEFAULT_FAVICON
|
||||
}
|
||||
};
|
||||
});
|
||||
root.containerOpen = false; // close a container after using it!
|
||||
|
||||
@@ -844,7 +844,10 @@ function History() //{{{
|
||||
{
|
||||
let index = window.getWebNavigation().sessionHistory.index;
|
||||
if (index == 0)
|
||||
return liberator.beep(); // really wanted?
|
||||
{
|
||||
liberator.beep(); // XXX: really wanted?
|
||||
return;
|
||||
}
|
||||
|
||||
window.getWebNavigation().gotoIndex(0);
|
||||
},
|
||||
@@ -853,7 +856,10 @@ function History() //{{{
|
||||
{
|
||||
let index = window.getWebNavigation().sessionHistory.index;
|
||||
if (index == window.getWebNavigation().sessionHistory.count - 1)
|
||||
return liberator.beep();
|
||||
{
|
||||
liberator.beep();
|
||||
return;
|
||||
}
|
||||
|
||||
window.getWebNavigation().gotoIndex(max);
|
||||
},
|
||||
|
||||
@@ -171,7 +171,7 @@ const config = { //{{{
|
||||
</> + "}",
|
||||
true);
|
||||
delete img;
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////// MAPPINGS ////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user