mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-02 17:19:38 +02:00
No need for arrow function for scoping
This commit is contained in:
parent
15450e3957
commit
bedfdff678
@ -1152,10 +1152,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||||||
// be generated if the user doesn't change his filter lists selection for
|
// be generated if the user doesn't change his filter lists selection for
|
||||||
// some set time.
|
// some set time.
|
||||||
|
|
||||||
µb.selfieManager = (( ) => {
|
{
|
||||||
let createTimer;
|
|
||||||
let destroyTimer;
|
|
||||||
|
|
||||||
// As of 2018-05-31:
|
// As of 2018-05-31:
|
||||||
// JSON.stringify-ing ourselves results in a better baseline
|
// JSON.stringify-ing ourselves results in a better baseline
|
||||||
// memory usage at selfie-load time. For some reasons.
|
// memory usage at selfie-load time. For some reasons.
|
||||||
@ -1206,9 +1203,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const load = async function() {
|
const load = async function() {
|
||||||
if ( µb.selfieIsInvalid ) {
|
if ( µb.selfieIsInvalid ) { return false; }
|
||||||
return false;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
const results = await Promise.all([
|
const results = await Promise.all([
|
||||||
loadMain(),
|
loadMain(),
|
||||||
@ -1231,6 +1226,9 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let createTimer;
|
||||||
|
let destroyTimer;
|
||||||
|
|
||||||
const destroy = function() {
|
const destroy = function() {
|
||||||
io.remove(/^selfie\//);
|
io.remove(/^selfie\//);
|
||||||
µb.selfieIsInvalid = true;
|
µb.selfieIsInvalid = true;
|
||||||
@ -1256,8 +1254,8 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||||||
µb.selfieIsInvalid = true;
|
µb.selfieIsInvalid = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
return { load, destroy: destroyAsync };
|
µb.selfieManager = { load, destroy: destroyAsync };
|
||||||
})();
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user