This commit is contained in:
gorhill 2017-07-03 10:54:30 -04:00
parent 414765f526
commit 186c119202
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
2 changed files with 8 additions and 7 deletions

View file

@ -578,12 +578,12 @@ body.colorBlind #netFilteringDialog .dialog > div.containers > div.dynamic tr.e
#filterFinderDialog .dialog { #filterFinderDialog .dialog {
padding: 1em; padding: 1em;
word-break: break-all;
} }
#filterFinderDialog .dialog code { #filterFinderDialog .dialog code {
background: #eee; background: #eee;
font-size: 85%; font-size: 85%;
padding: 3px; padding: 3px;
word-break: break-all;
} }
#filterFinderDialog .dialog ul { #filterFinderDialog .dialog ul {
font-size: larger; font-size: larger;

View file

@ -1227,8 +1227,8 @@ var reverseLookupManager = (function() {
if ( Array.isArray(lists) === false || lists.length === 0 ) { if ( Array.isArray(lists) === false || lists.length === 0 ) {
return null; return null;
} }
var node; var node,
var p = document.createElement('p'); p = document.createElement('p');
reSentence1.lastIndex = 0; reSentence1.lastIndex = 0;
var matches = reSentence1.exec(sentence1Template); var matches = reSentence1.exec(sentence1Template);
@ -1237,7 +1237,10 @@ var reverseLookupManager = (function() {
} else { } else {
node = uDom.nodeFromSelector('#filterFinderDialogSentence1 > span').cloneNode(true); node = uDom.nodeFromSelector('#filterFinderDialogSentence1 > span').cloneNode(true);
node.childNodes[0].textContent = sentence1Template.slice(0, matches.index); node.childNodes[0].textContent = sentence1Template.slice(0, matches.index);
node.childNodes[1].textContent = filter; // https://github.com/gorhill/uBlock/issues/2753
node.childNodes[1].textContent = filter.length <= 1024
? filter
: filter.slice(0, 1023) + '…';
node.childNodes[2].textContent = sentence1Template.slice(reSentence1.lastIndex); node.childNodes[2].textContent = sentence1Template.slice(reSentence1.lastIndex);
} }
p.appendChild(node); p.appendChild(node);
@ -1273,9 +1276,7 @@ var reverseLookupManager = (function() {
for ( var filter in response ) { for ( var filter in response ) {
var p = nodeFromFilter(filter, response[filter]); var p = nodeFromFilter(filter, response[filter]);
if ( p === null ) { if ( p === null ) { continue; }
continue;
}
dialog.appendChild(p); dialog.appendChild(p);
} }