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

fixed broken cosmetic filter list

This commit is contained in:
gorhill 2014-09-28 16:11:32 -04:00
parent f38b1a0299
commit 0e03d73037

View File

@ -638,8 +638,8 @@ var showDialog = function(options) {
root.style.display = src.length !== 0 ? '' : 'none'; root.style.display = src.length !== 0 ? '' : 'none';
}; };
populate(netFilterCandidates, 'ul > li:nth-of-type(1)'); populate(netFilterCandidates, '#netFilters');
populate(cosmeticFilterCandidates, 'ul > li:nth-of-type(2)'); populate(cosmeticFilterCandidates, '#cosmeticFilters');
divDialog.querySelector('ul').style.display = netFilterCandidates.length || cosmeticFilterCandidates.length ? '' : 'none'; divDialog.querySelector('ul').style.display = netFilterCandidates.length || cosmeticFilterCandidates.length ? '' : 'none';
divDialog.querySelector('#create').disabled = true; divDialog.querySelector('#create').disabled = true;
@ -938,8 +938,8 @@ var startPicker = function() {
'</div>', '</div>',
'</div>', '</div>',
'<ul>', '<ul>',
'<li><span>.</span><ul></ul>', '<li id="netFilters"><span>.</span><ul></ul>',
'<li><span>.</span><span>.</span><ul></ul>', '<li id="cosmeticFilters"><span>.</span><span>.</span><ul></ul>',
'</ul>', '</ul>',
'' ''
].join(''); ].join('');
@ -969,9 +969,9 @@ messaging.ask({ what: 'elementPickerArguments' }, function(details) {
'#create': 'create', '#create': 'create',
'#pick': 'pick', '#pick': 'pick',
'#quit': 'quit', '#quit': 'quit',
'ul > li:nth-of-type(1) > span:nth-of-type(1)': 'netFilters', 'ul > li#netFilters > span:nth-of-type(1)': 'netFilters',
'ul > li:nth-of-type(2) > span:nth-of-type(1)': 'cosmeticFilters', 'ul > li#cosmeticFilters > span:nth-of-type(1)': 'cosmeticFilters',
'ul > li:nth-of-type(2) > span:nth-of-type(2)': 'cosmeticFiltersHint' 'ul > li#cosmeticFilters > span:nth-of-type(2)': 'cosmeticFiltersHint'
}; };
for ( var k in i18nMap ) { for ( var k in i18nMap ) {