set current tab through pointer
This commit is contained in:
parent
6c3fcb992e
commit
40e38b390b
1 changed files with 8 additions and 2 deletions
|
@ -6,6 +6,7 @@ import MenuEntry from "./menuentry.js";
|
||||||
import ManagedWindow from "./ManagedWindow.js";
|
import ManagedWindow from "./ManagedWindow.js";
|
||||||
import IconIndicator from "./iconindicator.js";
|
import IconIndicator from "./iconindicator.js";
|
||||||
import check from "/scripts/external/check.js";
|
import check from "/scripts/external/check.js";
|
||||||
|
import pointer from "/scripts/data/pointer.js";
|
||||||
|
|
||||||
export default class EntryManager {
|
export default class EntryManager {
|
||||||
constructor () {
|
constructor () {
|
||||||
|
@ -32,8 +33,13 @@ export default class EntryManager {
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
(Tabs.query(null, 0)).then((DATA) => {
|
(Tabs.query(null, 0)).then((DATA) => {
|
||||||
if (DATA ? (DATA.url) : false) {
|
if (DATA ? (DATA.url) : false) {
|
||||||
(check.platform(DATA.url)).then((result) => {
|
(check.platform(DATA.url)).then(async (result) => {
|
||||||
(result) ? (this.enable()) : (this.disable())
|
if (result) {
|
||||||
|
this.enable();
|
||||||
|
await pointer.select(DATA.url);
|
||||||
|
} else {
|
||||||
|
this.disable();
|
||||||
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue