mirror of https://github.com/gorhill/uBlock.git
do not highlight when filter is "*"
This commit is contained in:
parent
fd9bc995f9
commit
c2b6ad1fad
18
js/stats.js
18
js/stats.js
|
@ -79,13 +79,17 @@ var renderURL = function(url, filter) {
|
|||
if ( reText.slice(0, 2) === '@@' ) {
|
||||
reText = reText.slice(2);
|
||||
}
|
||||
reText = reText
|
||||
.replace(/\./g, '\\.')
|
||||
.replace(/\?/g, '\\?')
|
||||
.replace('||', '')
|
||||
.replace(/\^/g, '.')
|
||||
.replace(/\*/g, '.*')
|
||||
;
|
||||
if ( reText === '*' ) {
|
||||
reText = '\\*';
|
||||
} else {
|
||||
reText = reText
|
||||
.replace(/\./g, '\\.')
|
||||
.replace(/\?/g, '\\?')
|
||||
.replace('||', '')
|
||||
.replace(/\^/g, '.')
|
||||
.replace(/\*/g, '.*')
|
||||
;
|
||||
}
|
||||
var re = new RegExp(reText, 'gi');
|
||||
var matches = re.exec(url);
|
||||
var renderedURL = chunkify(url);
|
||||
|
|
Loading…
Reference in New Issue