use the new checking module
This commit is contained in:
parent
2372e09c6d
commit
aaa33b3d39
2 changed files with 8 additions and 19 deletions
8
scripts/external/entries/manager.js
vendored
8
scripts/external/entries/manager.js
vendored
|
@ -5,20 +5,20 @@ import Tabs from "/scripts/GUI/tabs.js";
|
|||
import MenuEntry from "./menu.js";
|
||||
import ManagedSidebar from "./sidebar.js";
|
||||
import IconIndicator from "./icons.js";
|
||||
import filters from '../../filters.js';
|
||||
import check from "/scripts/external/check.js";
|
||||
|
||||
export default class EntryManager {
|
||||
constructor () {
|
||||
this.instances = {};
|
||||
this.instances.menu = new MenuEntry();
|
||||
Tabs.addActionListener(`onActivated`, (data) => {this.check()});
|
||||
Tabs.addActionListener(`onActivated`, (data) => {this.onRefresh()});
|
||||
}
|
||||
|
||||
async check() {
|
||||
async onRefresh() {
|
||||
const DATA = await Tabs.query(null, 0)
|
||||
|
||||
if (DATA.url) {
|
||||
(!!await ((new filters).select(DATA.url)))
|
||||
(!!await check.platform(DATA.url))
|
||||
? (this.enable())
|
||||
: (this.disable())
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue