mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-06-27 10:30:31 +02:00
Exclude comment matches when matching domain matches
This commit is contained in:
@ -23,7 +23,7 @@ function getDomains() {
|
|||||||
let domains = []
|
let domains = []
|
||||||
|
|
||||||
const matchesRegex = new RegExp(/export\s+const\s+matches\s+=\s+(?<matches>\[.*?])/gms)
|
const matchesRegex = new RegExp(/export\s+const\s+matches\s+=\s+(?<matches>\[.*?])/gms)
|
||||||
const matchesClassesRegex = new RegExp(/new\s+(?<class>\w+)\(\)/gms)
|
const matchesClassesRegex = new RegExp(/(?<!\/\/\s*)new\s+(?<class>\w+)\(\)/gms)
|
||||||
|
|
||||||
const matchTs = fs.readFileSync('src/match/match.ts')
|
const matchTs = fs.readFileSync('src/match/match.ts')
|
||||||
const jsMatches = matchesRegex.exec(matchTs).groups.matches
|
const jsMatches = matchesRegex.exec(matchTs).groups.matches
|
||||||
|
Reference in New Issue
Block a user