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

Delta Between Two Patch Sets: background.js

Issue 29337729: Issue 2374 - Implemented Tweaks section in options page (Closed)
Left Patch Set: Created Feb. 29, 2016, 5:27 p.m.
Right Patch Set: Created March 16, 2016, 11:13 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 | « README.md ('k') | locale/en-US/options.json » ('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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 modules.prefs = { 94 modules.prefs = {
95 Prefs: { 95 Prefs: {
96 onChanged: new Notifier() 96 onChanged: new Notifier()
97 } 97 }
98 }; 98 };
99 var prefs = { 99 var prefs = {
100 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [], 100 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [],
101 notifications_showui: params.showNotificationUI, 101 notifications_showui: params.showNotificationUI,
102 safari_contentblocker: false, 102 safari_contentblocker: false,
103 shouldShowBlockElementMenu: true, 103 shouldShowBlockElementMenu: true,
104 show_devtools_panel: true,
104 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc eptionrules.txt" 105 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc eptionrules.txt"
105 }; 106 };
106 Object.keys(prefs).forEach(function(key) 107 Object.keys(prefs).forEach(function(key)
107 { 108 {
108 Object.defineProperty(modules.prefs.Prefs, key, { 109 Object.defineProperty(modules.prefs.Prefs, key, {
109 get: function() 110 get: function()
110 { 111 {
111 return prefs[key]; 112 return prefs[key];
112 }, 113 },
113 set: function(value) 114 set: function(value)
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 236 }
236 } 237 }
237 }; 238 };
238 239
239 modules.filterClasses = { 240 modules.filterClasses = {
240 BlockingFilter: function() {}, 241 BlockingFilter: function() {},
241 Filter: function(text) 242 Filter: function(text)
242 { 243 {
243 this.text = text; 244 this.text = text;
244 this.disabled = false; 245 this.disabled = false;
245 } 246 },
247 RegExpFilter: function() {}
246 }; 248 };
247 modules.filterClasses.Filter.fromText = function(text) 249 modules.filterClasses.Filter.fromText = function(text)
248 { 250 {
249 return new modules.filterClasses.Filter(text); 251 return new modules.filterClasses.Filter(text);
250 }; 252 };
253 modules.filterClasses.RegExpFilter.typeMap = Object.create(null);
251 254
252 modules.filterValidation = 255 modules.filterValidation =
253 { 256 {
254 parseFilter: function(text) 257 parseFilter: function(text)
255 { 258 {
256 if (params.filterError) 259 if (params.filterError)
257 return {error: "Invalid filter"}; 260 return {error: "Invalid filter"};
258 return {filter: modules.filterClasses.Filter.fromText(text)}; 261 return {filter: modules.filterClasses.Filter.fromText(text)};
259 }, 262 },
260 parseFilters: function(text) 263 parseFilters: function(text)
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 469
467 if (params.safariContentBlocker) 470 if (params.safariContentBlocker)
468 { 471 {
469 global.safari = { 472 global.safari = {
470 extension: { 473 extension: {
471 setContentBlocker: function() {} 474 setContentBlocker: function() {}
472 } 475 }
473 }; 476 };
474 } 477 }
475 })(this); 478 })(this);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld