1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-20 01:12:38 +01:00

[mv3] Add more specific purposed annoyances-related lists

Import country flag-related code from uBO.

Switch to AdGuard annoyance-related lists, as this solves
https://github.com/uBlockOrigin/uBOL-issues/issues/5#issuecomment-1583192594
This commit is contained in:
Raymond Hill 2023-06-11 09:20:10 -04:00
parent 1f3e5da32d
commit 4ddfb3f278
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
4 changed files with 44 additions and 16 deletions

View File

@ -109,7 +109,6 @@ p {
.listEntry > * {
margin-left: 0;
margin-right: 0;
text-transform: capitalize;
unicode-bidi: embed;
}
.listEntry .listname {

View File

@ -22,7 +22,7 @@
'use strict';
import { browser, sendMessage, localRead, localWrite } from './ext.js';
import { i18n$ } from './i18n.js';
import { i18n$, i18n } from './i18n.js';
import { dom, qs$, qsa$ } from './dom.js';
/******************************************************************************/
@ -70,7 +70,7 @@ function renderFilterLists(soft = false) {
if ( dom.attr(li, 'data-listkey') !== ruleset.id ) {
dom.attr(li, 'data-listkey', ruleset.id);
qs$(li, 'input[type="checkbox"]').checked = on;
dom.text(qs$(li, '.listname'), ruleset.name || ruleset.id);
qs$(li, '.listname').append(i18n.patchUnicodeFlags(ruleset.name));
dom.cl.remove(li, 'toRemove');
if ( ruleset.homeURL ) {
dom.cl.add(li, 'support');

View File

@ -1058,29 +1058,56 @@ async function main() {
// Handpicked annoyance rulesets from assets.json
await rulesetFromURLs({
id: 'easylist-cookies',
name: 'EasyList Cookies Notices' ,
id: 'annoyances-cookies',
name: 'AdGuard Cookies Notices',
group: 'annoyances',
enabled: false,
urls: [
'https://ublockorigin.github.io/uAssets/thirdparties/easylist-cookies.txt',
'https://filters.adtidy.org/extension/ublock/filters/18.txt',
'https://ublockorigin.github.io/uAssets/filters/annoyances-cookies.txt',
],
homeURL: 'https://github.com/uBlockOrigin/uAssets',
homeURL: 'https://github.com/AdguardTeam/AdguardFilters#adguard-filters',
});
await rulesetFromURLs({
id: 'easylist-annoyances',
name: 'EasyList Annoyances' ,
id: 'annoyances-overlays',
name: 'AdGuard/uBO Overlays',
group: 'annoyances',
enabled: false,
urls: [
'https://ublockorigin.github.io/uAssets/thirdparties/easylist-annoyances.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easylist-chat.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easylist-newsletters.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easylist-notifications.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easylist-social.txt',
'https://ublockorigin.github.io/uAssets/filters/annoyances.txt',
'https://filters.adtidy.org/extension/ublock/filters/19.txt',
'https://ublockorigin.github.io/uAssets/filters/annoyances-others.txt',
],
homeURL: 'https://github.com/uBlockOrigin/uAssets',
homeURL: 'https://github.com/AdguardTeam/AdguardFilters#adguard-filters',
});
await rulesetFromURLs({
id: 'annoyances-social',
name: 'AdGuard Social Media',
group: 'annoyances',
enabled: false,
urls: [
'https://filters.adtidy.org/extension/ublock/filters/4.txt',
],
homeURL: 'https://github.com/AdguardTeam/AdguardFilters#adguard-filters',
});
await rulesetFromURLs({
id: 'annoyances-widgets',
name: 'AdGuard Widgets',
group: 'annoyances',
enabled: false,
urls: [
'https://filters.adtidy.org/extension/ublock/filters/22.txt',
],
homeURL: 'https://github.com/AdguardTeam/AdguardFilters#adguard-filters',
});
await rulesetFromURLs({
id: 'annoyances-others',
name: 'AdGuard Other Annoyances',
group: 'annoyances',
enabled: false,
urls: [
'https://filters.adtidy.org/extension/ublock/filters/21.txt',
],
homeURL: 'https://github.com/AdguardTeam/AdguardFilters#adguard-filters',
});
// Handpicked rulesets from abroad

View File

@ -57,6 +57,8 @@ cp src/js/fa-icons.js $DES/js/
cp src/js/i18n.js $DES/js/
cp src/lib/punycode.js $DES/js/
cp -R src/img/flags-of-the-world $DES/img
cp LICENSE.txt $DES/
echo "*** uBOLite.mv3: Copying mv3-specific files"