mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-12 10:17:31 +09:00
[Pale-Moon] Issue MoonchildProductions/UXP#1828 - Stop using js expression closures in Pale Moon front-end
Stop using non-standard JS expression closures in Pale Moon front-end.
This commit is contained in:
parent
e349f9b884
commit
264752661b
28 changed files with 244 additions and 149 deletions
|
|
@ -1472,7 +1472,7 @@ var gBrowserInit = {
|
|||
let itemArray = itemBranch.getChildList("");
|
||||
|
||||
// See if any privacy.item prefs are set
|
||||
let doMigrate = itemArray.some(function(name) itemBranch.prefHasUserValue(name));
|
||||
let doMigrate = itemArray.some(name => itemBranch.prefHasUserValue(name));
|
||||
// Or if sanitizeOnShutdown is set
|
||||
if (!doMigrate) {
|
||||
doMigrate = gPrefService.getBoolPref("privacy.sanitize.sanitizeOnShutdown");
|
||||
|
|
@ -2955,7 +2955,7 @@ const BrowserSearch = {
|
|||
|
||||
// Check to see whether we've already added an engine with this title
|
||||
if (browser.engines) {
|
||||
if (browser.engines.some(function(e) e.title == engine.title)) {
|
||||
if (browser.engines.some(e => e.title == engine.title)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -4420,7 +4420,7 @@ nsBrowserAccess.prototype = {
|
|||
},
|
||||
|
||||
isTabContentWindow: function(aWindow) {
|
||||
return gBrowser.browsers.some(function(browser) browser.contentWindow == aWindow);
|
||||
return gBrowser.browsers.some(browser => browser.contentWindow == aWindow);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4664,8 +4664,8 @@ var TabsInTitlebar = {
|
|||
},
|
||||
|
||||
_update: function() {
|
||||
function $(id) document.getElementById(id);
|
||||
function rect(ele) ele.getBoundingClientRect();
|
||||
let $ = id => document.getElementById(id);
|
||||
let rect = ele => ele.getBoundingClientRect();
|
||||
|
||||
if (!this._initialized || window.fullScreen) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue