Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: background.js

Issue 29564735: Issue 5587 - Use options module (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created Oct. 4, 2017, 9:13 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ext/background.js » ('j') | ext/background.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -392,16 +392,27 @@
modules.subscriptionInit = {
reinitialized: params.filterlistsReinitialized
};
modules.messaging = {
port: new EventEmitter()
};
+ modules.options = {
+ showOptions(callback)
+ {
+ if (!/\/options\.html\b/.test(top.location.href))
+ window.open("options.html", "_blank");
+
+ if (callback)
+ callback();
+ }
+ };
+
window.addEventListener("message", (event) =>
{
if (event.data.type != "message")
return;
let message = event.data.payload;
let {messageId} = event.data;
let sender = {
page: new ext.Page(event.source)
« no previous file with comments | « no previous file | ext/background.js » ('j') | ext/background.js » ('J')

Powered by Google App Engine
This is Rietveld