mirror of https://github.com/gorhill/uBlock.git
Add "Social widgets", "Cookie notices" sections in "Filter lists" pane
Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3154
This commit is contained in:
parent
aac88ac766
commit
21a76e32a1
|
@ -246,10 +246,10 @@
|
||||||
},
|
},
|
||||||
"adguard-social": {
|
"adguard-social": {
|
||||||
"content": "filters",
|
"content": "filters",
|
||||||
"group": "annoyances",
|
"group": "social",
|
||||||
"parent": "AdGuard – Annoyances",
|
"parent": null,
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "AdGuard – Social Media",
|
"title": "AdGuard – Social Widgets",
|
||||||
"tags": "annoyances social",
|
"tags": "annoyances social",
|
||||||
"contentURL": "https://filters.adtidy.org/extension/ublock/filters/4.txt",
|
"contentURL": "https://filters.adtidy.org/extension/ublock/filters/4.txt",
|
||||||
"supportURL": "https://github.com/AdguardTeam/AdguardFilters#adguard-filters",
|
"supportURL": "https://github.com/AdguardTeam/AdguardFilters#adguard-filters",
|
||||||
|
@ -257,8 +257,8 @@
|
||||||
},
|
},
|
||||||
"adguard-cookies": {
|
"adguard-cookies": {
|
||||||
"content": "filters",
|
"content": "filters",
|
||||||
"group": "annoyances",
|
"group": "cookies",
|
||||||
"parent": "AdGuard – Annoyances|AdGuard/uBO – Cookie Notices",
|
"parent": "AdGuard/uBO – Cookie Notices",
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "AdGuard – Cookie Notices",
|
"title": "AdGuard – Cookie Notices",
|
||||||
"tags": "annoyances cookies",
|
"tags": "annoyances cookies",
|
||||||
|
@ -268,8 +268,8 @@
|
||||||
},
|
},
|
||||||
"ublock-cookies-adguard": {
|
"ublock-cookies-adguard": {
|
||||||
"content": "filters",
|
"content": "filters",
|
||||||
"group": "annoyances",
|
"group": "cookies",
|
||||||
"parent": "AdGuard – Annoyances|AdGuard/uBO – Cookie Notices",
|
"parent": "AdGuard/uBO – Cookie Notices",
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "uBlock filters – Cookie Notices",
|
"title": "uBlock filters – Cookie Notices",
|
||||||
"tags": "annoyances cookies",
|
"tags": "annoyances cookies",
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
},
|
},
|
||||||
"fanboy-thirdparty_social": {
|
"fanboy-thirdparty_social": {
|
||||||
"content": "filters",
|
"content": "filters",
|
||||||
"group": "annoyances",
|
"group": "social",
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "Fanboy – Anti-Facebook",
|
"title": "Fanboy – Anti-Facebook",
|
||||||
"tags": "privacy",
|
"tags": "privacy",
|
||||||
|
@ -369,8 +369,8 @@
|
||||||
},
|
},
|
||||||
"fanboy-cookiemonster": {
|
"fanboy-cookiemonster": {
|
||||||
"content": "filters",
|
"content": "filters",
|
||||||
"group": "annoyances",
|
"group": "cookies",
|
||||||
"parent": "EasyList – Annoyances|EasyList/uBO – Cookie Notices",
|
"parent": "EasyList/uBO – Cookie Notices",
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "EasyList – Cookie Notices",
|
"title": "EasyList – Cookie Notices",
|
||||||
"tags": "annoyances cookies",
|
"tags": "annoyances cookies",
|
||||||
|
@ -389,8 +389,8 @@
|
||||||
},
|
},
|
||||||
"ublock-cookies-easylist": {
|
"ublock-cookies-easylist": {
|
||||||
"content": "filters",
|
"content": "filters",
|
||||||
"group": "annoyances",
|
"group": "cookies",
|
||||||
"parent": "EasyList – Annoyances|EasyList/uBO – Cookie Notices",
|
"parent": "EasyList/uBO – Cookie Notices",
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "uBlock filters – Cookie Notices",
|
"title": "uBlock filters – Cookie Notices",
|
||||||
"tags": "annoyances cookies",
|
"tags": "annoyances cookies",
|
||||||
|
@ -441,8 +441,8 @@
|
||||||
},
|
},
|
||||||
"fanboy-social": {
|
"fanboy-social": {
|
||||||
"content": "filters",
|
"content": "filters",
|
||||||
"group": "annoyances",
|
"group": "social",
|
||||||
"parent": "EasyList – Annoyances",
|
"parent": null,
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "EasyList – Social Widgets",
|
"title": "EasyList – Social Widgets",
|
||||||
"tags": "annoyances social",
|
"tags": "annoyances social",
|
||||||
|
|
|
@ -483,6 +483,14 @@
|
||||||
"message": "Malware protection, security",
|
"message": "Malware protection, security",
|
||||||
"description": "Filter lists section name"
|
"description": "Filter lists section name"
|
||||||
},
|
},
|
||||||
|
"3pGroupSocial": {
|
||||||
|
"message": "Social widgets",
|
||||||
|
"description": "Filter lists section name"
|
||||||
|
},
|
||||||
|
"3pGroupCookies": {
|
||||||
|
"message": "Cookie notices",
|
||||||
|
"description": "Filter lists section name"
|
||||||
|
},
|
||||||
"3pGroupAnnoyances": {
|
"3pGroupAnnoyances": {
|
||||||
"message": "Annoyances",
|
"message": "Annoyances",
|
||||||
"description": "Filter lists section name"
|
"description": "Filter lists section name"
|
||||||
|
|
|
@ -74,7 +74,9 @@ const renderNodeStats = (used, total) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const i18nGroupName = name => {
|
const i18nGroupName = name => {
|
||||||
return i18n$('3pGroup' + name.charAt(0).toUpperCase() + name.slice(1));
|
const groupname = i18n$('3pGroup' + name.charAt(0).toUpperCase() + name.slice(1));
|
||||||
|
if ( groupname !== '' ) { return groupname; }
|
||||||
|
return `${name.charAt(0).toLocaleUpperCase}${name.slice(1)}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -223,6 +225,8 @@ const renderFilterLists = ( ) => {
|
||||||
'privacy',
|
'privacy',
|
||||||
'malware',
|
'malware',
|
||||||
'multipurpose',
|
'multipurpose',
|
||||||
|
'cookies',
|
||||||
|
'social',
|
||||||
'annoyances',
|
'annoyances',
|
||||||
'regions',
|
'regions',
|
||||||
'custom'
|
'custom'
|
||||||
|
@ -235,9 +239,6 @@ const renderFilterLists = ( ) => {
|
||||||
}
|
}
|
||||||
for ( const [ listkey, listDetails ] of Object.entries(response.available) ) {
|
for ( const [ listkey, listDetails ] of Object.entries(response.available) ) {
|
||||||
let groupKey = listDetails.group;
|
let groupKey = listDetails.group;
|
||||||
if ( groupKey === 'social' ) {
|
|
||||||
groupKey = 'annoyances';
|
|
||||||
}
|
|
||||||
const groupDetails = listTree[groupKey];
|
const groupDetails = listTree[groupKey];
|
||||||
if ( listDetails.parent !== undefined ) {
|
if ( listDetails.parent !== undefined ) {
|
||||||
let lists = groupDetails.lists;
|
let lists = groupDetails.lists;
|
||||||
|
@ -699,8 +700,6 @@ dom.on('.searchbar input', 'input', searchFilterLists);
|
||||||
|
|
||||||
const expandedListSet = new Set([
|
const expandedListSet = new Set([
|
||||||
'uBlock filters',
|
'uBlock filters',
|
||||||
'AdGuard – Annoyances',
|
|
||||||
'EasyList – Annoyances',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const listIsExpanded = which => {
|
const listIsExpanded = which => {
|
||||||
|
|
Loading…
Reference in New Issue