mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-13 02:14:17 +01:00
rename "Social" filter list category to "Annoyances"
This commit is contained in:
parent
355dbc00ba
commit
c641cadea9
2 changed files with 16 additions and 5 deletions
|
@ -319,9 +319,9 @@
|
||||||
"message":"Malware domains",
|
"message":"Malware domains",
|
||||||
"description":"English: Malware domains"
|
"description":"English: Malware domains"
|
||||||
},
|
},
|
||||||
"3pGroupSocial":{
|
"3pGroupAnnoyances":{
|
||||||
"message":"Social",
|
"message":"Annoyances",
|
||||||
"description":"English: Social"
|
"description":"The header identifying the filter lists in the category 'annoyances'"
|
||||||
},
|
},
|
||||||
"3pGroupMultipurpose":{
|
"3pGroupMultipurpose":{
|
||||||
"message":"Multipurpose",
|
"message":"Multipurpose",
|
||||||
|
|
|
@ -69,7 +69,8 @@ var renderFilterLists = function(soft) {
|
||||||
listEntryTemplate = uDom('#templates .listEntry'),
|
listEntryTemplate = uDom('#templates .listEntry'),
|
||||||
listStatsTemplate = vAPI.i18n('3pListsOfBlockedHostsPerListStats'),
|
listStatsTemplate = vAPI.i18n('3pListsOfBlockedHostsPerListStats'),
|
||||||
renderElapsedTimeToString = vAPI.i18n.renderElapsedTimeToString,
|
renderElapsedTimeToString = vAPI.i18n.renderElapsedTimeToString,
|
||||||
hideUnusedLists = document.body.classList.contains('hideUnused');
|
hideUnusedLists = document.body.classList.contains('hideUnused'),
|
||||||
|
groupNames = new Map();
|
||||||
|
|
||||||
// Assemble a pretty list name if possible
|
// Assemble a pretty list name if possible
|
||||||
var listNameFromListKey = function(listKey) {
|
var listNameFromListKey = function(listKey) {
|
||||||
|
@ -170,7 +171,17 @@ var renderFilterLists = function(soft) {
|
||||||
var liGroup = document.querySelector('#lists > .groupEntry[data-groupkey="' + groupKey + '"]');
|
var liGroup = document.querySelector('#lists > .groupEntry[data-groupkey="' + groupKey + '"]');
|
||||||
if ( liGroup === null ) {
|
if ( liGroup === null ) {
|
||||||
liGroup = listGroupTemplate.clone().nodeAt(0);
|
liGroup = listGroupTemplate.clone().nodeAt(0);
|
||||||
var groupName = vAPI.i18n('3pGroup' + groupKey.charAt(0).toUpperCase() + groupKey.slice(1));
|
var groupName = groupNames.get(groupKey);
|
||||||
|
if ( groupName === undefined ) {
|
||||||
|
groupName = vAPI.i18n('3pGroup' + groupKey.charAt(0).toUpperCase() + groupKey.slice(1));
|
||||||
|
// Category "Social" is being renamed "Annoyances": ensure
|
||||||
|
// smooth transition.
|
||||||
|
// TODO: remove when majority of users are post-1.14.8 uBO.
|
||||||
|
if ( groupName === '' && groupKey === 'social' ) {
|
||||||
|
groupName = vAPI.i18n('3pGroupAnnoyances');
|
||||||
|
}
|
||||||
|
groupNames.set(groupKey, groupName);
|
||||||
|
}
|
||||||
if ( groupName !== '' ) {
|
if ( groupName !== '' ) {
|
||||||
liGroup.querySelector('.geName').textContent = groupName;
|
liGroup.querySelector('.geName').textContent = groupName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue