Index: ext/common.js
===================================================================
--- a/ext/common.js
+++ b/ext/common.js
@@ -141,7 +141,7 @@
return [text, placeholders];
};
- var readCatalog = function(locale)
+ var readCatalog = function(locale, catalogFile)
{
var xhr = new XMLHttpRequest();
xhr.open("GET", "locale/" + locale + "/" + catalogFile, false);
@@ -190,7 +190,9 @@
if (locales.length == 0)
return "";
- readCatalog(locales.shift());
+ var locale = locales.shift();
+ readCatalog(locale, "common.json");
+ readCatalog(locale, catalogFile);
}
}
};
Index: locale/en-US/common.json
===================================================================
new file mode 100644
--- /dev/null
+++ b/locale/en-US/common.json
@@ -0,0 +1,18 @@
+{
+ "common_feature_anti_adblock_title": {
+ "description": "Feature title for anti-adblock blocking filter list",
+ "message": "Hide Adblock Warning Messages"
+ },
+ "common_feature_malware_title": {
+ "description": "Feature title for anti-malware filter list",
+ "message": "Block Malware"
+ },
+ "common_feature_privacy_title": {
+ "description": "Feature title for privacy filter list",
+ "message": "Disable Tracking"
+ },
+ "common_feature_social_title": {
+ "description": "Feature title for social media blocking filter list",
+ "message": "Remove Social Media Buttons"
+ }
+}
Index: options.js
===================================================================
--- a/options.js
+++ b/options.js
@@ -210,7 +210,7 @@
if (subscriptionUrl in recommendationsMap)
{
var recommendation = recommendationsMap[subscriptionUrl];
- if (recommendation.isAdsType)
+ if (recommendation.type == "ads")
{
if (subscription.disabled == false)
{
@@ -257,9 +257,9 @@
if (subscriptionUrl in recommendationsMap)
{
var recommendation = recommendationsMap[subscriptionUrl];
- if (recommendation.isPopular)
+ if (recommendation.type != "ads")
collection = collections.popular;
- else if (recommendation.isAdsType && subscription.disabled == false)
+ else if (subscription.disabled == false)
collection = collections.langs;
else
collection = collections.allLangs;
@@ -309,19 +309,17 @@
subscription.homepage = null;
subscription.lastSuccess = null;
var recommendation = Object.create(null);
- recommendation.isAdsType = false;
- recommendation.isPopular = false;
+ recommendation.type = element.getAttribute("type");
var prefix = element.getAttribute("prefixes");
if (prefix)
{
- var prefix = element.getAttribute("prefixes").replace(/,/g, "_");
+ prefix = prefix.replace(/\W/g, "_");
subscription.title = ext.i18n.getMessage("options_language_" + prefix);
- recommendation.isAdsType = true;
}
else
{
- subscription.title = element.getAttribute("specialization");
- recommendation.isPopular = true;
+ var type = recommendation.type.replace(/\W/g, "_");
+ subscription.title = ext.i18n.getMessage("common_feature_" + type + "_title");
}
recommendationsMap[subscription.url] = recommendation;
Index: subscriptions.xml
===================================================================
--- a/subscriptions.xml
+++ b/subscriptions.xml
@@ -23,117 +23,128 @@
url="https://easylist-downloads.adblockplus.org/easylist.txt"
homepage="https://easylist.adblockplus.org/"
prefixes="en"
- author="fanboy, MonztA, Famlam, Khrin"/>
+ author="fanboy, MonztA, Famlam, Khrin"
+ type="ads"/>
+ author="heradhis"
+ type="ads"/>
+ author="Александър Станев"
+ type="ads"/>
+ author="John, Li"
+ type="ads"/>
+ author="tomasko126"
+ type="ads"/>
+ author="Famlam"
+ type="ads"/>
+ author="MonztA, Famlam"
+ type="ads"/>
+ author="BsT"
+ type="ads"/>
+ author="Khrin"
+ type="ads"/>
+ author="Algimantas Margevičius"
+ type="ads"/>
+ author="anonymous74100"
+ type="ads"/>
+ author="smed79"
+ type="ads"/>
+ author="Lian, Crits, smed79"
+ type="ads"/>
+ author="MenetZ, Zoso"
+ type="ads"/>
-
-
+
+
-
+
+
-
-
-
-
-
+ homepage="https://easylist.adblockplus.org/"
+ author="fanboy, Famlam, MonztA"
+ type="social"/>
+