summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/search.js17
-rw-r--r--ext/bg/js/settings/main.js5
2 files changed, 1 insertions, 21 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 67a78075..540b809b 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -238,17 +238,6 @@ class DisplaySearch extends Display {
}
}
- onRuntimeMessage({action, params}, sender, callback) {
- const handlers = DisplaySearch.runtimeMessageHandlers;
- if (hasOwn(handlers, action)) {
- const handler = handlers[action];
- const result = handler(this, params);
- callback(result);
- } else {
- return super.onRuntimeMessage({action, params}, sender, callback);
- }
- }
-
initClipboardMonitor() {
// ignore copy from search page
window.addEventListener('copy', () => {
@@ -380,12 +369,6 @@ class DisplaySearch extends Display {
}
}
-DisplaySearch.runtimeMessageHandlers = {
- getUrl: () => {
- return {url: window.location.href};
- }
-};
-
DisplaySearch.onKeyDownIgnoreKeys = {
'ANY_MOD': [
'Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'PageDown', 'PageUp', 'Home', 'End',
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js
index 7456e7a4..0fd9cb23 100644
--- a/ext/bg/js/settings/main.js
+++ b/ext/bg/js/settings/main.js
@@ -199,14 +199,11 @@ async function onOptionsUpdate({source}) {
await formWrite(options);
}
-function onMessage({action, params}, sender, callback) {
+function onMessage({action, params}) {
switch (action) {
case 'optionsUpdate':
onOptionsUpdate(params);
break;
- case 'getUrl':
- callback({url: window.location.href});
- break;
}
}