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

Unified Diff: background.js

Issue 29478597: Issue 5326 - General tab (HTML, strings and functionality) (Closed)
Patch Set: rebase Created Aug. 23, 2017, 12:36 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 | locale/en-US/new-options.json » ('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
@@ -102,7 +102,8 @@
notifications_showui: params.showNotificationUI,
shouldShowBlockElementMenu: true,
show_devtools_panel: true,
- subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exceptionrules.txt"
+ subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exceptionrules.txt",
+ subscriptions_exceptionsurl_privacy: "https://easylist-downloads.adblockplus.org/exceptionrules-privacy.txt"
};
for (let key of Object.keys(prefs))
{
@@ -141,6 +142,15 @@
this._lastDownload = 1234;
this.homepage = "https://easylist.adblockplus.org/";
this.downloadStatus = params.downloadStatus;
+
+ if (subscriptions[this.url] && subscriptions[this.url].title)
+ {
+ this.title = subscriptions[this.url].title;
+ }
+ if (this.url == prefs.subscriptions_exceptionsurl_privacy)
+ {
+ this.title = "Allow only nonintrusive ads that are privacy-friendly";
+ }
}
Subscription.prototype =
{
@@ -438,14 +448,27 @@
];
let knownFilters = filters.map(modules.filterClasses.Filter.fromText);
- let subscriptions = [
- "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt",
- "https://easylist-downloads.adblockplus.org/exceptionrules.txt",
- "https://easylist-downloads.adblockplus.org/fanboy-social.txt",
- "~user~786254"
- ];
+ let subscriptions = {
+ "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt": {
+ title: "EasyList Germany+EasyList"
+ },
+ "https://easylist-downloads.adblockplus.org/exceptionrules.txt": {
+ title: "Allow non-intrusive advertising"
+ },
+ "https://easylist-downloads.adblockplus.org/fanboy-social.txt": {
+ title: "Fanboy's Social Blocking List",
+ type: "social"
+ },
+ "https://easylist-downloads.adblockplus.org/antiadblockfilters.txt": {
+ title: "Adblock Warning Removal List"
+ },
+ "~user~78625": {
+ title: "My filter list"
+ }
+ };
+
let knownSubscriptions = Object.create(null);
- for (let subscriptionUrl of subscriptions)
+ for (let subscriptionUrl in subscriptions)
{
knownSubscriptions[subscriptionUrl] =
modules.subscriptionClasses.Subscription.fromURL(subscriptionUrl);
« no previous file with comments | « no previous file | locale/en-US/new-options.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld