mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 03:47:57 +01:00
whitespace and semicolon fixes
This commit is contained in:
@@ -200,7 +200,7 @@ function Bookmarks() //{{{
|
||||
if (event == "add")
|
||||
autocommands.trigger("BookmarkAdd", arg);
|
||||
statusline.updateUrl();
|
||||
}
|
||||
};
|
||||
|
||||
var cache = storage.newObject("bookmark-cache", Cache, false);
|
||||
storage.addObserver("bookmark-cache", bookmarkObserver);
|
||||
@@ -835,7 +835,7 @@ function History() //{{{
|
||||
{
|
||||
url: item[0],
|
||||
title: item[1],
|
||||
icon: bookmarks.getFavicon(item[0]),
|
||||
icon: bookmarks.getFavicon(item[0])
|
||||
} for each ([i, item] in Iterator(items)) if (i < 1000)));
|
||||
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||
}
|
||||
|
||||
@@ -1083,12 +1083,11 @@ function Buffer() //{{{
|
||||
elem.focus();
|
||||
|
||||
var evt = doc.createEvent("MouseEvents");
|
||||
["mousedown", "mouseup", "click"].forEach(function (event)
|
||||
{
|
||||
["mousedown", "mouseup", "click"].forEach(function (event) {
|
||||
evt.initMouseEvent(event, true, true, view, 1, offsetX, offsetY, 0, 0,
|
||||
ctrlKey, /*altKey*/0, shiftKey, /*metaKey*/ ctrlKey, 0, null);
|
||||
elem.dispatchEvent(evt);
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
get selectionController() getBrowser().docShell
|
||||
@@ -1289,8 +1288,7 @@ function Buffer() //{{{
|
||||
}
|
||||
|
||||
let option = options["pageinfo"];
|
||||
let list = template.map(option, function (option)
|
||||
{
|
||||
let list = template.map(option, function (option) {
|
||||
let opt = pageInfo[option];
|
||||
if (opt)
|
||||
return template.table(opt[1], opt[0](true));
|
||||
|
||||
@@ -216,7 +216,7 @@ function Commands() //{{{
|
||||
["int", parseInt],
|
||||
["float", parseFloat],
|
||||
["list", function (arg) arg && arg.split(/\s*,\s*/)]
|
||||
].map(function (x) x && ArgType.apply(null, x));;
|
||||
].map(function (x) x && ArgType.apply(null, x));
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
////////////////////// PUBLIC SECTION //////////////////////////////////////////
|
||||
|
||||
@@ -465,7 +465,8 @@ function Events() //{{{
|
||||
let args = {
|
||||
url: doc.location.href,
|
||||
title: doc.title
|
||||
}
|
||||
};
|
||||
|
||||
if (liberator.has("tabs"))
|
||||
args.tab = tabs.getContentIndex(doc) + 1;
|
||||
|
||||
@@ -559,7 +560,7 @@ function Events() //{{{
|
||||
if (Components.utils.reportError)
|
||||
Components.utils.reportError(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// return true when load successful, or false otherwise
|
||||
@@ -1348,7 +1349,7 @@ function Events() //{{{
|
||||
}
|
||||
|
||||
// others are left to generate the 'input' event or handled by firefox
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ function Search() //{{{
|
||||
return range;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
var start = new Point(win.pageXOffset, win.pageYOffset);
|
||||
let selection = sel.getSelection(sel.SELECTION_NORMAL);
|
||||
@@ -226,14 +226,14 @@ function Search() //{{{
|
||||
sel.scrollSelectionIntoView(sel.SELECTION_NORMAL, 0, false);
|
||||
lastRange = range.cloneRange();
|
||||
return range;
|
||||
}
|
||||
};
|
||||
|
||||
this.cancel = function ()
|
||||
{
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(startRange);
|
||||
win.scrollTo(start.x, start.y);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* Stolen from toolkit.jar in Firefox, for the time being. The private
|
||||
|
||||
@@ -336,7 +336,9 @@ function Hints() //{{{
|
||||
return false;
|
||||
}
|
||||
else if (validHints.length > 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var timeout = followFirst || events.feedingKeys ? 0 : 500;
|
||||
@@ -598,15 +600,15 @@ function Hints() //{{{
|
||||
|
||||
mappings.add(myModes, ["f"],
|
||||
"Start QuickHint mode",
|
||||
function () { hints.show("o") });
|
||||
function () { hints.show("o"); });
|
||||
|
||||
mappings.add(myModes, ["F"],
|
||||
"Start QuickHint mode, but open link in a new tab",
|
||||
function () { hints.show("t") });
|
||||
function () { hints.show("t"); });
|
||||
|
||||
mappings.add(myModes, [";"],
|
||||
"Start an extended hint mode",
|
||||
function (arg) { hints.show(arg) },
|
||||
function (arg) { hints.show(arg); },
|
||||
{ flags: Mappings.flags.ARGUMENT });
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
|
||||
@@ -323,7 +323,7 @@ function IO() //{{{
|
||||
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", lastRunCommand)
|
||||
);
|
||||
|
||||
lastRunCommand = args
|
||||
lastRunCommand = args;
|
||||
|
||||
let output = io.system(args);
|
||||
let command = ":" + util.escapeHTML(commandline.getCommand()) + "<br/>";
|
||||
@@ -743,7 +743,7 @@ lookup:
|
||||
|
||||
if (!found)
|
||||
liberator.echomsg("not found in 'runtimepath': \"" + paths.join(" ") + "\"", 1); // FIXME: should use original arg string
|
||||
|
||||
|
||||
return found;
|
||||
},
|
||||
|
||||
@@ -787,7 +787,7 @@ lookup:
|
||||
.getService(Components.interfaces.mozIJSSubScriptLoader);
|
||||
try
|
||||
{
|
||||
loader.loadSubScript(uri.spec, modules)
|
||||
loader.loadSubScript(uri.spec, modules);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ const liberator = (function () //{{{
|
||||
|
||||
const tabopts = [
|
||||
["n", "Tab number", null, ".hl-TabNumber"],
|
||||
["N", "Tab number over icon", null, ".hl-TabIconNumber"],
|
||||
["N", "Tab number over icon", null, ".hl-TabIconNumber"]
|
||||
];
|
||||
options.add(["guioptions", "go"],
|
||||
"Show or hide certain GUI elements like the menu or toolbar",
|
||||
@@ -141,7 +141,7 @@ const liberator = (function () //{{{
|
||||
return value;
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
registerObserver("load_mappings", function ()
|
||||
{
|
||||
@@ -159,7 +159,7 @@ const liberator = (function () //{{{
|
||||
mappings.add([modes.NORMAL], ["ZZ"],
|
||||
"Quit and save the session",
|
||||
function () { liberator.quit(true); });
|
||||
})
|
||||
});
|
||||
|
||||
registerObserver("load_commands", function ()
|
||||
{
|
||||
@@ -530,7 +530,7 @@ const liberator = (function () //{{{
|
||||
argCount: "0",
|
||||
bang: true
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
// initially hide all GUI, it is later restored unless the user has :set go= or something
|
||||
// similar in his config
|
||||
|
||||
@@ -171,13 +171,13 @@ function Options() //{{{
|
||||
// Trigger any setters.
|
||||
let opt = options.get(option);
|
||||
if (event == "change" && opt)
|
||||
opt.set(opt.value, options.OPTION_SCOPE_GLOBAL)
|
||||
opt.set(opt.value, options.OPTION_SCOPE_GLOBAL);
|
||||
}
|
||||
|
||||
storage.newMap("options", false);
|
||||
storage.addObserver("options", optionObserver);
|
||||
liberator.registerObserver("shutdown", function () {
|
||||
storage.removeObserver("options", optionObserver)
|
||||
storage.removeObserver("options", optionObserver);
|
||||
});
|
||||
|
||||
function storePreference(name, value)
|
||||
@@ -440,8 +440,8 @@ function Options() //{{{
|
||||
ret.prefix = prefix;
|
||||
ret.postfix = postfix;
|
||||
|
||||
ret.all = (ret.name == "all")
|
||||
ret.get = (ret.all || postfix == "?" || (ret.option && ret.option.type != "boolean" && !valueGiven))
|
||||
ret.all = (ret.name == "all");
|
||||
ret.get = (ret.all || postfix == "?" || (ret.option && ret.option.type != "boolean" && !valueGiven));
|
||||
ret.invert = (prefix == "inv" || postfix == "!");
|
||||
ret.reset = (postfix == "&");
|
||||
ret.unsetBoolean = (prefix == "no");
|
||||
@@ -761,7 +761,7 @@ function Options() //{{{
|
||||
switch (option.type)
|
||||
{
|
||||
case "boolean":
|
||||
completer = function () [["true", ""], ["false", ""]]
|
||||
completer = function () [["true", ""], ["false", ""]];
|
||||
break;
|
||||
case "stringlist":
|
||||
len = opt.valueHas.pop().length;
|
||||
@@ -930,7 +930,7 @@ function Options() //{{{
|
||||
}
|
||||
yield option;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let list = template.options("Options", opts());
|
||||
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||
@@ -964,7 +964,7 @@ function Options() //{{{
|
||||
|
||||
yield option;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let list = template.options(config.hostApplication + " Options", prefs());
|
||||
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||
|
||||
@@ -31,11 +31,11 @@ function Highlights(name, store, serial)
|
||||
CompItem[selected] background: yellow;
|
||||
CompItem>* padding: 0 .5ex;
|
||||
CompIcon width: 16px; min-width: 16px;
|
||||
CompIcon>img max-width: 16px; max-height: 16px; vertical-align: middle;
|
||||
CompResult width: 45%; overflow: hidden;
|
||||
CompDesc color: gray;
|
||||
CompIcon>img max-width: 16px; max-height: 16px; vertical-align: middle;
|
||||
CompResult width: 45%; overflow: hidden;
|
||||
CompDesc color: gray;
|
||||
|
||||
Indicator color: blue;
|
||||
Indicator color: blue;
|
||||
Filter font-weight: bold;
|
||||
|
||||
Keyword color: red;
|
||||
|
||||
@@ -96,7 +96,7 @@ const util = { //{{{
|
||||
{
|
||||
this.doneAt = Date.now() + minInterval;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.tell = function (arg)
|
||||
{
|
||||
if (arg !== undefined)
|
||||
@@ -115,17 +115,17 @@ const util = { //{{{
|
||||
this.latest = now + maxInterval;
|
||||
timer.initWithCallback(this, Math.max(timeout, 0), timer.TYPE_ONE_SHOT);
|
||||
this.doneAt = -1;
|
||||
}
|
||||
};
|
||||
this.reset = function ()
|
||||
{
|
||||
timer.cancel();
|
||||
this.doneAt = 0;
|
||||
}
|
||||
};
|
||||
this.flush = function ()
|
||||
{
|
||||
if (this.latest)
|
||||
this.notify();
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
ciCompare: function (a, b)
|
||||
|
||||
@@ -316,7 +316,7 @@ The valid escape sequences are:
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
"q-" can be prefixed to the escape sequence so that the value is quoted, making
|
||||
it suitable for expression evaluation. Example: <q-args>
|
||||
it suitable for expression evaluation. Example: <q-args>
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user