summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-19 22:28:23 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-19 22:28:23 -0400
commitdbec4bffda00615fe768f66c1eb5d895aea05585 (patch)
tree54dccc8a6b9d73b67d990b8be59d3c38604de027 /ext/fg/js
parenta5d7de8e97400f63c328ccde9b313a127cef0611 (diff)
Make the search button reuse an open search tab if it exists
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/frontend.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 45d24329..e854f74e 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -237,8 +237,8 @@ class Frontend {
const handlers = Frontend.runtimeMessageHandlers;
if (handlers.hasOwnProperty(action)) {
const handler = handlers[action];
- handler(this, params);
- callback();
+ const result = handler(this, params);
+ callback(result);
}
}
@@ -576,5 +576,9 @@ Frontend.runtimeMessageHandlers = {
popupSetVisibleOverride: (self, {visible}) => {
self.popup.setVisibleOverride(visible);
+ },
+
+ getUrl: () => {
+ return {url: window.location.href};
}
};