Commit 29d2faf1 authored by Hubert Figuière's avatar Hubert Figuière

Issue 6731 - Handle anti-circumvention filter list

parent 2fe1f424
......@@ -178,6 +178,12 @@
title: "Fanboy's Social Blocking List",
installed: true
},
[`${subscriptionServer}/abp-filters-anti-cv.txt`]: {
title: "ABP Anti-Circumvention list",
installed: true,
disabled: false,
recommended: "circumvention"
},
[`${subscriptionServer}/antiadblockfilters.txt`]: {
title: "Adblock Warning Removal List",
installed: true,
......
......@@ -149,6 +149,17 @@
<p class="i18n_options_language_tip"></p>
</div>
</section>
<section class="cols">
<h2 class="i18n_options_anti_cv_header"></h2>
<ul class="list" id="anti-cv-table">
<template>
<button data-action="toggle-remove-subscription" data-disable="preconfigured" role="checkbox" class="control icon"></button>
<span class="i18n_options_anti_cv_title"></span>
<span data-tooltip="options_anti_cv_tooltip"></span>
<span class="i18n_options_new_label new"></span>
</template>
</ul>
</section>
<section id="more-filters" class="cols">
<header>
<h2 class="i18n_options_more_filters_header"></h2>
......@@ -220,7 +231,6 @@
</li>
</ul>
</section>
<section>
<header>
<h2 class="i18n_options_filterList_title"></h2>
......
......@@ -359,6 +359,11 @@ function focusNextElement(container, currentElement)
return true;
}
collections.cv = new Collection([
{
id: "anti-cv-table"
}
]);
collections.protection = new Collection([
{
id: "recommend-protection-list-table"
......@@ -400,23 +405,27 @@ collections.filterLists = new Collection([
function addSubscription(subscription)
{
const {disabled} = subscription;
const {disabled, recommended, url} = subscription;
let collection = null;
if (subscription.recommended)
if (recommended)
{
if (subscription.recommended == "ads")
if (recommended == "ads")
{
if (disabled == false)
collection = collections.langs;
collections.allLangs.addItem(subscription);
}
else if (recommended == "circumvention")
{
collection = collections.cv;
}
else
{
collection = collections.protection;
}
}
else if (!isAcceptableAds(subscription.url) && disabled == false)
else if (!isAcceptableAds(url) && disabled == false)
{
collection = collections.more;
}
......@@ -424,7 +433,7 @@ function addSubscription(subscription)
if (collection)
collection.addItem(subscription);
subscriptionsMap[subscription.url] = subscription;
subscriptionsMap[url] = subscription;
updateTooltips();
}
......@@ -532,7 +541,8 @@ function loadRecommendations()
url: element.getAttribute("url")
};
if (subscription.recommended != "ads")
if (subscription.recommended != "ads" &&
subscription.recommended != "circumvention")
{
type = type.replace(/\W/g, "_");
subscription.title = getMessage("common_feature_" +
......
......@@ -440,5 +440,17 @@
"example": "example.com"
}
}
},
"options_anti_cv_header": {
"description": "Text for the section about anti CV",
"message": "Anti-Circumvention"
},
"options_anti_cv_title": {
"description": "Title for the Anti-Circumvention list",
"message": "ABP Anti-Circumvention Filter List"
},
"options_anti_cv_tooltip": {
"description": "Tooltip for the anti circumvention list",
"message": "This filter list works against circumvention (i.e. techniques to force ads on ad-blocking users). These filters address circumventing ads as well as related tracking."
}
}
......@@ -137,6 +137,13 @@
prefixes="ru,uk"
author="Lain_13, dimisa"
type="ads"/>
<subscription title="ABP filters"
specialization="Anti Circumvention, English"
url="https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt"
homepage="https://github.com/abp-filters/abp-filters-anti-cv"
prefixes="en"
author="eyeo GmbH"
type="circumvention"/>
<subscription title="EasyPrivacy"
specialization="privacy protection"
url="https://easylist-downloads.adblockplus.org/easyprivacy.txt"
......@@ -149,4 +156,4 @@
homepage="https://easylist.to/"
author="fanboy, Famlam, MonztA"
type="social"/>
</subscriptions>
\ No newline at end of file
</subscriptions>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment