Since filters can be instantiated, rename class as FilterManager
This commit is contained in:
parent
174bdd5ee8
commit
98b01c8380
1 changed files with 10 additions and 11 deletions
|
@ -10,10 +10,10 @@ import {Queue} from "/scripts/utils/common.js";
|
|||
import logging from "/scripts/logging.js"
|
||||
// const logging = (await import(chrome.runtime.getURL("/scripts/logging.js"))).default;
|
||||
|
||||
export default class filters {
|
||||
export default class FilterManager {
|
||||
constructor() {
|
||||
this.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Get all filters.
|
||||
|
@ -34,7 +34,7 @@ export default class filters {
|
|||
};
|
||||
|
||||
if (URL) {
|
||||
let SELECTED = await global.search(`filters`, URL, `URL`, 0.5, {"cloud": -1});
|
||||
let SELECTED = await global.search(`filters`, URL, [`URL`], {"strictness": 0.5, "cloud": -1});
|
||||
|
||||
if ((SELECTED && SELECTED != null && (typeof SELECTED).includes(`obj`)) ? (Object.keys(SELECTED)).length : false) {
|
||||
this.one = (Object.entries(SELECTED))[0][1];
|
||||
|
@ -131,6 +131,5 @@ export default class filters {
|
|||
logging.warn(texts.localized(`settings_filters_removal_stop`));
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue