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

Delta Between Two Patch Sets: background.js

Issue 29544706: Noissue - Adapt check for devtools panel support for Firefox (Closed)
Left Patch Set: Use compareVersion from coreUtils Created Sept. 18, 2017, 6:20 p.m.
Right Patch Set: Use parseInt() Created Sept. 23, 2017, 12:42 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | messageResponder.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 } 101 }
102 }; 102 };
103 103
104 modules.prefs = {Prefs: new EventEmitter()}; 104 modules.prefs = {Prefs: new EventEmitter()};
105 let prefs = { 105 let prefs = {
106 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [], 106 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [],
107 notifications_showui: params.showNotificationUI, 107 notifications_showui: params.showNotificationUI,
108 shouldShowBlockElementMenu: true, 108 shouldShowBlockElementMenu: true,
109 show_devtools_panel: true, 109 show_devtools_panel: true,
110 ui_warn_tracking: true,
110 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc eptionrules.txt", 111 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc eptionrules.txt",
111 subscriptions_exceptionsurl_privacy: "https://easylist-downloads.adblockplus .org/exceptionrules-privacy.txt" 112 subscriptions_exceptionsurl_privacy: "https://easylist-downloads.adblockplus .org/exceptionrules-privacy.txt"
112 }; 113 };
113 for (let key of Object.keys(prefs)) 114 for (let key of Object.keys(prefs))
114 { 115 {
115 Object.defineProperty(modules.prefs.Prefs, key, { 116 Object.defineProperty(modules.prefs.Prefs, key, {
116 get() 117 get()
117 { 118 {
118 return prefs[key]; 119 return prefs[key];
119 }, 120 },
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 addonVersion: "2.6.7" 393 addonVersion: "2.6.7"
393 }; 394 };
394 updateFromURL(modules.info); 395 updateFromURL(modules.info);
395 396
396 modules.subscriptionInit = { 397 modules.subscriptionInit = {
397 reinitialized: params.filterlistsReinitialized 398 reinitialized: params.filterlistsReinitialized
398 }; 399 };
399 400
400 modules.messaging = { 401 modules.messaging = {
401 port: new EventEmitter() 402 port: new EventEmitter()
402 };
403
404 modules.coreUtils = {
405 compareVersion(v1, v2)
406 {
407 return parseFloat(v1) - parseFloat(v2);
408 }
409 }; 403 };
410 404
411 window.addEventListener("message", (event) => 405 window.addEventListener("message", (event) =>
412 { 406 {
413 if (event.data.type != "message") 407 if (event.data.type != "message")
414 return; 408 return;
415 let message = event.data.payload; 409 let message = event.data.payload;
416 let {messageId} = event.data; 410 let {messageId} = event.data;
417 let sender = { 411 let sender = {
418 page: new ext.Page(event.source) 412 page: new ext.Page(event.source)
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 }, 595 },
602 filter: { 596 filter: {
603 text: "||example.com/some-annoying-popup$popup", 597 text: "||example.com/some-annoying-popup$popup",
604 whitelisted: false, 598 whitelisted: false,
605 userDefined: true, 599 userDefined: true,
606 subscription: null 600 subscription: null
607 } 601 }
608 }); 602 });
609 }); 603 });
610 }()); 604 }());
LEFTRIGHT

Powered by Google App Engine
This is Rietveld