Skip to content

Commit

Permalink
fix: better regex
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Mar 24, 2023
1 parent 1dc17cf commit b665562
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion replace.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const gLocales = ['com', 'de']; // TODO: collect more locales
const matcher = new RegExp(`^(https?:\/\/)?((maps|www)\.)?google\.(${gLocales.join('|')})\/maps(\/embed)?\/?\?`);
const matcher = new RegExp(
`^(https?:\/\/)?(maps\.google\.(${gLocales.join('|')})\/maps\/?\?.*output=embed|(www\.)?google\.(${gLocales.join('|')})\/maps\/embed\/?\?)`
);

Array.from(
document.getElementsByTagName('iframe')
Expand Down

0 comments on commit b665562

Please sign in to comment.