Index: desktop-options.js |
=================================================================== |
copy from options.js |
copy to desktop-options.js |
--- a/options.js |
+++ b/desktop-options.js |
@@ -740,8 +740,19 @@ |
case "prefs.respond": |
onPrefMessage(message.action, message.args[0]); |
break; |
case "subscriptions.respond": |
onSubscriptionMessage(message.action, message.args[0]); |
break; |
} |
}); |
+ |
+$(() => |
Manish Jethani
2017/09/26 20:37:16
As the last thing in this script, we add a listene
Sebastian Noack
2017/09/27 01:38:34
Perhaps we don't even need this.
All, the old opt
Manish Jethani
2017/09/27 11:20:54
We could use "app.listen" in lieu of "ping" here.
|
+{ |
+ ext.onMessage.addListener((message, sender, sendResponse) => |
+ { |
+ if (message.type == "ping") |
+ sendResponse(true); |
Manish Jethani
2017/09/26 20:37:15
We also have to respond to any ping we receive.
|
+ }); |
+ |
+ ext.backgroundPage.sendMessage({type: "ping"}); |
+}); |