move the user actions file
This commit is contained in:
parent
78178b98af
commit
b6869a7d61
4 changed files with 24 additions and 8 deletions
|
@ -1,7 +0,0 @@
|
|||
export default class user_actions {
|
||||
static init() {
|
||||
chrome.sidePanel
|
||||
.setPanelBehavior({ openPanelOnActionClick: true })
|
||||
.catch((error) => console.error(error));
|
||||
};
|
||||
};
|
14
scripts/actions/tabs.js
Normal file
14
scripts/actions/tabs.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import Tabs from "/scripts/GUI/tabs.js";
|
||||
import Entry from "/scripts/external/entry.js"
|
||||
|
||||
export default class Watcher_Tabs {
|
||||
constructor () {
|
||||
Tabs.addActionListener(`update`, this.check);
|
||||
};
|
||||
|
||||
check(data) {
|
||||
if ((data.tab) ? data.tab.url : false) {
|
||||
Entry.manage(data.tab);
|
||||
}
|
||||
}
|
||||
}
|
9
scripts/actions/user_actions.js
Normal file
9
scripts/actions/user_actions.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
import Watcher_Tabs from "./tabs.js";
|
||||
|
||||
export default class user_actions {
|
||||
static init() {
|
||||
chrome.sidePanel.setPanelBehavior({ openPanelOnActionClick: true }).catch((error) => console.error(error));
|
||||
|
||||
new Watcher_Tabs();
|
||||
};
|
||||
};
|
|
@ -3,7 +3,7 @@ Shop wisely with AI!
|
|||
*/
|
||||
|
||||
import fc from './fc.js';
|
||||
import user_actions from "./GUI/user_actions.js";
|
||||
import user_actions from "./actions/user_actions.js";
|
||||
|
||||
fc.run();
|
||||
user_actions.init();
|
Loading…
Add table
Add a link
Reference in a new issue