1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-27 21:55:47 +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

@@ -515,11 +515,15 @@ var Buffer = Module("Buffer", {
for (let elem of iter(elems))
yield elem;
function a(regexp, elem) regexp.test(elem.textContent) === regexp.result ||
Array.some(elem.childNodes,
child => (regexp.test(child.alt) === regexp.result));
function a(regexp, elem) {
return regexp.test(elem.textContent) === regexp.result ||
Array.some(elem.childNodes,
child => (regexp.test(child.alt) === regexp.result));
}
function b(regexp, elem) regexp.test(elem.title) === regexp.result;
function b(regexp, elem) {
return regexp.test(elem.title) === regexp.result;
}
let res = Array.filter(frame.document.querySelectorAll(selector),
Hints.isVisible);
@@ -617,7 +621,9 @@ var Buffer = Module("Buffer", {
* viewport.
*/
resetCaret: function resetCaret() {
function visible(range) util.intersection(DOM(range).rect, viewport);
function visible(range) {
return util.intersection(DOM(range).rect, viewport);
}
function getRanges(rect) {
let nodes = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils)
@@ -2771,9 +2777,12 @@ Buffer.addPageInfoSection("s", "Security", function* (verbose) {
return; // For now
// Modified from Firefox
function location(data) Ary.compact([
data.city, data.state, data.country
]).join(", ");
function location(data) {
return Ary.compact([data.city,
data.state,
data.country])
.join(", ");
}
switch (statusline.security) {
case "secure":