add background listener for sidebar
This commit is contained in:
parent
bec1de898e
commit
4c604581bd
1 changed files with 17 additions and 4 deletions
|
@ -1,8 +1,21 @@
|
||||||
import Sidebar from '/scripts/GUI/sidepanel.js'
|
import Sidebar from '/scripts/GUI/sidepanel.js'
|
||||||
|
|
||||||
export default class ManagedSidebar {
|
export default class ManagedSidebar {
|
||||||
constructor () {
|
static manage() {
|
||||||
// WIP
|
chrome.runtime.onMessage.addListener(
|
||||||
new Sidebar(`/pages/popup.htm`);
|
function(request, sender, sendResponse) {
|
||||||
}
|
if (request.action.includes("sidebar_open")) {
|
||||||
|
ManagedSidebar.enable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static enable() {
|
||||||
|
new Sidebar(`/pages/popup.htm`);
|
||||||
|
}
|
||||||
|
|
||||||
|
disable() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue