mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-06-28 02:50:32 +02:00
Add functions to bypass websites that are redirected to (looking at you voe)
This commit is contained in:
14
src/match/match.ts
Normal file
14
src/match/match.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import {Match, matches} from "./matches";
|
||||
import {getAllDisabled, getDisabled} from "../store/store";
|
||||
|
||||
export async function getMatch(host: string): Promise<Match | undefined> {
|
||||
if (await getAllDisabled()) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
for (const match of matches) {
|
||||
if (match.domains.some(v => host.indexOf(v) !== -1) && !((await getDisabled()).some(v => v === match))) {
|
||||
return match
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user