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 {
padding: 1em;
word-break: break-all;
}
#filterFinderDialog .dialog code {
background: #eee;
font-size: 85%;
padding: 3px;
word-break: break-all;
}
#filterFinderDialog .dialog ul {
font-size: larger;

View file

@ -1227,8 +1227,8 @@ var reverseLookupManager = (function() {
if ( Array.isArray(lists) === false || lists.length === 0 ) {
return null;
}
var node;
var p = document.createElement('p');
var node,
p = document.createElement('p');
reSentence1.lastIndex = 0;
var matches = reSentence1.exec(sentence1Template);
@ -1237,7 +1237,10 @@ var reverseLookupManager = (function() {
} else {
node = uDom.nodeFromSelector('#filterFinderDialogSentence1 > span').cloneNode(true);
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);
}
p.appendChild(node);
@ -1273,9 +1276,7 @@ var reverseLookupManager = (function() {
for ( var filter in response ) {
var p = nodeFromFilter(filter, response[filter]);
if ( p === null ) {
continue;
}
if ( p === null ) { continue; }
dialog.appendChild(p);
}