Some backend configuration setup
This commit is contained in:
1 parent
64c8c2d49b
commit
5d3d55977b
3 files changed
+44
-8
No files matched your search
+12
-1
@@ -7,7 +7,8 @@ class BrowserMod {
|
||||
|
||||
connect(conn) {
|
||||
console.log("Connection opened. Connecting to browser_mod");
|
||||
this.connection = conn.subscribeMessage((msg) => this.callback(msg), {
|
||||
this.conn = conn
|
||||
conn.subscribeMessage((msg) => this.callback(msg), {
|
||||
type: 'browser_mod/connect',
|
||||
deviceID: deviceID,
|
||||
});
|
||||
@@ -20,6 +21,16 @@ class BrowserMod {
|
||||
console.log(msg);
|
||||
}
|
||||
|
||||
update() {
|
||||
if(!this.conn) return;
|
||||
|
||||
this.conn.sendMessage({
|
||||
type: 'browser_mod/update',
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
window.browser_mod = new BrowserMod();
|
||||
|
||||
Reference in new issue
Block a user