duangsuse / WebExt-URLReplace

Replace URL by regex pattern mapping

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URLReplace

Replace tab document.location in page-script, need storage permission to manage settings options.html

Building

npm run build 

#will run clean, sh build.sh, zip package combination

Limitation

  1. escape in destinations like: \1 can be ambiguated with digits in URL

  2. regex trim will trim out many abnormal char from source URL

const REGEX_TRIM = /(\([^\)]*)|\^|\$|\*|\(|\)|\[|\{|\\|\|/g; // rest metachar: .+?-
const trimRegex = s => s.replace(REGEX_TRIM, "");

About

Replace URL by regex pattern mapping

License:GNU General Public License v3.0


Languages

Language:JavaScript 71.4%Language:HTML 13.7%Language:CSS 10.1%Language:Shell 4.8%