mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
do not highlight when filter is "*"
This commit is contained in:
parent
fd9bc995f9
commit
c2b6ad1fad
1 changed files with 11 additions and 7 deletions
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 a new issue