mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Minor code review
This commit is contained in:
parent
83974d4293
commit
d6fc057d3b
1 changed files with 1 additions and 3 deletions
|
|
@ -118,7 +118,7 @@ export const matchesFromHostnames = hostnames => {
|
|||
|
||||
export const hostnameFromMatch = origin => {
|
||||
if ( origin === '<all_urls>' || origin === '*://*/*' ) { return 'all-urls'; }
|
||||
const match = reOriginToHostname.exec(origin);
|
||||
const match = /^\*:\/\/(?:\*\.)?([^/]+)\/\*/.exec(origin);
|
||||
if ( match === null ) { return ''; }
|
||||
return match[1];
|
||||
};
|
||||
|
|
@ -133,8 +133,6 @@ export const hostnamesFromMatches = origins => {
|
|||
return out;
|
||||
};
|
||||
|
||||
const reOriginToHostname = /^\*:\/\/(?:\*\.)?([^/]+)\/\*/;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
const broadcastMessage = message => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue