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: Include check for mobile-options.html Created Oct. 5, 2017, 12:08 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') | no next file with comments »
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 (!/\/(mobile-)?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') | no next file with comments »

Powered by Google App Engine
This is Rietveld