Lastest | Extension |
---|---|
matchpattern.js | Easy Proxy |
<script src="https://jc3213.github.io/matchpattern.js/matchpattern.js"></script>
// @require https://jc3213.github.io/matchpattern.js/matchpattern.js
let match = new MatchPattern(); // requires v0.4~
match.proxy = 'SOCKS 127.0.0.1:1080';
array
- read only
let { data } = match;
string
- read only
let { pacScript } = match;
match.new(string[]);
match.add(string | string[]);
match.delete(string | string[]);
match.clear();
let result = match.test(string);
Map
- readonly
let { caches } = MatchPattern;
string
- read only
let { pacScript } = match;
let result = MatchPattern.test(string);
let rule = MatchPattern.make(string);
MatchPattern.delete(string | string[]);
example.com
- Matches
www.example.com
,example.com
- Doesn't Match
test-example.com
,www.example.com.cn
- Matches
Match Pattern ↓ | www.youtube.com | www.facebook.net | x.com | telegram.org |
---|---|---|---|---|
* | ✅ | ✅ | ✅ | ✅ |
youtube.com | ✅ | ❌ | ❌ | ❌ |
facebook.com | ❌ | ✅ | ❌ | ❌ |
x.com | ❌ | ❌ | ✅ | ❌ |
com | ✅ | ❌ | ✅ | ❌ |
org | ❌ | ❌ | ❌ | ✅ |
youtube | ❌ | ❌ | ❌ | ❌ |
telegram | ❌ | ❌ | ❌ | ❌ |