Skip to content

Commit

Permalink
Do not suggest network filters with wildcarded hostname in picker
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Feb 22, 2021
1 parent 007a123 commit b7a2352
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/scriptlets/epicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ const mergeStrings = function(urls) {
merged = merged.replace(/^\*+$/, '')
.replace(/\*{2,}/g, '*')
.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;
};

/******************************************************************************/
Expand Down

0 comments on commit b7a2352

Please sign in to comment.