summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--background/page_info_server.js9
-rw-r--r--common/message_server.js (renamed from background/message_server.js)0
2 files changed, 3 insertions, 6 deletions
diff --git a/background/page_info_server.js b/background/page_info_server.js
index 49919fd..6f02750 100644
--- a/background/page_info_server.js
+++ b/background/page_info_server.js
@@ -40,11 +40,6 @@ async function handle_subscription(connection_data, message)
connection_data.port.postMessage(["new_url", query_all(url)]);
}
-function remove_storage_listener(cb)
-{
- storage.remove_change_listener(cb);
-}
-
function new_connection(port)
{
console.log("new page info connection!");
@@ -59,7 +54,9 @@ function new_connection(port)
storage.add_change_listener(_handle_change);
port.onMessage.addListener(m => handle_subscription(connection_data, m));
- port.onDisconnect.addListener(() => remove_storage_listener(handle_change));
+ port.onDisconnect.addListener(
+ () => storage.remove_change_listener(_handle_change)
+ );
}
async function start_page_info_server()
diff --git a/background/message_server.js b/common/message_server.js
index a541a04..a541a04 100644
--- a/background/message_server.js
+++ b/common/message_server.js