Skip to content

Commit

Permalink
Merge pull request #155 from WesleyBranton/development
Browse files Browse the repository at this point in the history
Fixed domain regex in popup
  • Loading branch information
WesleyBranton authored May 4, 2022
2 parents e5959f4 + 29e70ec commit 9ab6e1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/popup/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function renderForUrl(url, rules) {
return;
}

const domainRegex = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/;
const domainRegex = /^(?:(?![-])[a-zA-Z0-9-]+(?<!-)\.)+[a-zA-Z]{2,}$/;
if (!domainRegex.test(url.hostname)) {
renderForGeneral();
return;
Expand Down

0 comments on commit 9ab6e1f

Please sign in to comment.