1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 14:18:00 +01:00

Replace expression closures (function declarations).

Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
Doug Kearns
2015-05-25 23:59:30 +10:00
parent 5ab1befbf7
commit c0b7c4c35d
31 changed files with 292 additions and 162 deletions

View File

@@ -798,9 +798,11 @@ var Hints = Module("hints", {
this.addMode("i", "Show image", elem => dactyl.open(elem.src));
this.addMode("I", "Show image in a new tab", elem => dactyl.open(elem.src, dactyl.NEW_TAB));
function isScrollable(elem) isinstance(elem, [Ci.nsIDOMHTMLFrameElement,
Ci.nsIDOMHTMLIFrameElement]) ||
Buffer.isScrollable(elem, 0, true) || Buffer.isScrollable(elem, 0, false);
function isScrollable(elem) {
return isinstance(elem, [Ci.nsIDOMHTMLFrameElement, Ci.nsIDOMHTMLIFrameElement]) ||
Buffer.isScrollable(elem, 0, true) ||
Buffer.isScrollable(elem, 0, false);
}
},
hintSession: Modes.boundProperty(),
@@ -820,7 +822,9 @@ var Hints = Module("hints", {
* @optional
*/
addMode: function (mode, prompt, action, filter, tags) {
function toString(regexp) RegExp.prototype.toString.call(regexp);
function toString(regexp) {
return RegExp.prototype.toString.call(regexp);
}
if (tags != null) {
let eht = options.get("extendedhinttags");
@@ -912,7 +916,9 @@ var Hints = Module("hints", {
* @param {string} str The string to split.
* @returns {Array(string)} The lowercased splits of the splitting.
*/
function tokenize(pat, str) str.split(pat).map(String.toLowerCase);
function tokenize(pat, str) {
return str.split(pat).map(String.toLowerCase);
}
/**
* Get a hint matcher for hintmatching=contains