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

Side by Side Diff: background.js

Issue 29712664: Issue 6432 - Hide remove button for additional filter lists (Closed)
Patch Set: Created March 1, 2018, 9:43 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | js/desktop-options.js » ('j') | js/desktop-options.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 for (let param of params) 61 for (let param of params)
62 { 62 {
63 let parts = param.split("=", 2); 63 let parts = param.split("=", 2);
64 if (parts.length == 2 && parts[0] in data) 64 if (parts.length == 2 && parts[0] in data)
65 data[parts[0]] = decodeURIComponent(parts[1]); 65 data[parts[0]] = decodeURIComponent(parts[1]);
66 } 66 }
67 } 67 }
68 } 68 }
69 69
70 let params = { 70 let params = {
71 additionalSubscriptions: false,
Thomas Greiner 2018/03/02 11:33:35 Detail: Please also mention this new parameter in
Thomas Greiner 2018/03/02 11:33:35 Why not implement this the same way as "blockedURL
saroyanm 2018/03/02 13:50:29 Done.
saroyanm 2018/03/02 13:50:29 Done.
71 blockedURLs: "", 72 blockedURLs: "",
72 filterlistsReinitialized: false, 73 filterlistsReinitialized: false,
73 addSubscription: false, 74 addSubscription: false,
74 filterError: false, 75 filterError: false,
75 downloadStatus: "synchronize_ok", 76 downloadStatus: "synchronize_ok",
76 showNotificationUI: false, 77 showNotificationUI: false,
77 showPageOptions: false 78 showPageOptions: false
78 }; 79 };
79 updateFromURL(params); 80 updateFromURL(params);
80 81
(...skipping 15 matching lines...) Expand all
96 }, 97 },
97 get readingDirection() 98 get readingDirection()
98 { 99 {
99 return /^(?:ar|fa|he|ug|ur)\b/.test(this.appLocale) ? "rtl" : "ltr"; 100 return /^(?:ar|fa|he|ug|ur)\b/.test(this.appLocale) ? "rtl" : "ltr";
100 } 101 }
101 } 102 }
102 }; 103 };
103 104
104 modules.prefs = {Prefs: new EventEmitter()}; 105 modules.prefs = {Prefs: new EventEmitter()};
105 let prefs = { 106 let prefs = {
106 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [], 107 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [],
Thomas Greiner 2018/03/02 17:00:02 Detail: This change is unrelated to this issue and
107 notifications_showui: params.showNotificationUI, 108 notifications_showui: params.showNotificationUI,
108 shouldShowBlockElementMenu: true, 109 shouldShowBlockElementMenu: true,
109 show_devtools_panel: true, 110 show_devtools_panel: true,
110 ui_warn_tracking: true, 111 ui_warn_tracking: true,
112 additional_subscriptions: (params.additionalSubscriptions) ? ["https://easyl ist-downloads.adblockplus.org/easylistgermany+easylist.txt"] : [],
kzar 2018/03/02 09:57:01 Nit: The paranthesis around params.additionalSubsc
Thomas Greiner 2018/03/02 11:33:35 Sounds like a personal preference which I usually
saroyanm 2018/03/02 13:50:29 Done.
kzar 2018/03/05 13:23:21 Thanks
111 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc eptionrules.txt", 113 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc eptionrules.txt",
112 subscriptions_exceptionsurl_privacy: "https://easylist-downloads.adblockplus .org/exceptionrules-privacy-friendly.txt" 114 subscriptions_exceptionsurl_privacy: "https://easylist-downloads.adblockplus .org/exceptionrules-privacy-friendly.txt"
113 }; 115 };
114 for (let key of Object.keys(prefs)) 116 for (let key of Object.keys(prefs))
115 { 117 {
116 Object.defineProperty(modules.prefs.Prefs, key, { 118 Object.defineProperty(modules.prefs.Prefs, key, {
117 get() 119 get()
118 { 120 {
119 return prefs[key]; 121 return prefs[key];
120 }, 122 },
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 }, 614 },
613 filter: { 615 filter: {
614 text: "||example.com/some-annoying-popup$popup", 616 text: "||example.com/some-annoying-popup$popup",
615 whitelisted: false, 617 whitelisted: false,
616 userDefined: true, 618 userDefined: true,
617 subscription: null 619 subscription: null
618 } 620 }
619 }); 621 });
620 }); 622 });
621 }()); 623 }());
OLDNEW
« no previous file with comments | « no previous file | js/desktop-options.js » ('j') | js/desktop-options.js » ('J')

Powered by Google App Engine
This is Rietveld