mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 17:02:27 +02:00
Do not suggest network filters with wildcarded hostname in picker
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1494
This commit is contained in:
parent
007a123c63
commit
b7a2352c6f
@ -176,7 +176,11 @@ const mergeStrings = function(urls) {
|
|||||||
merged = merged.replace(/^\*+$/, '')
|
merged = merged.replace(/^\*+$/, '')
|
||||||
.replace(/\*{2,}/g, '*')
|
.replace(/\*{2,}/g, '*')
|
||||||
.replace(/([^*]{1,3}\*)(?:[^*]{1,3}\*)+/g, '$1');
|
.replace(/([^*]{1,3}\*)(?:[^*]{1,3}\*)+/g, '$1');
|
||||||
return merged;
|
|
||||||
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/1494
|
||||||
|
let pos = merged.indexOf('/');
|
||||||
|
if ( pos === -1 ) { pos = merged.length; }
|
||||||
|
return merged.slice(0, pos).includes('*') ? urls[0] : merged;
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user