mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-05-09 12:15:14 +02:00
Add streama2z.com (#19)
This commit is contained in:
parent
3cd4c6b6b7
commit
298e9308ce
@ -35,6 +35,10 @@ async function main() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
|
||||
// send the url to the ff2mpv (https://github.com/woodruffw/ff2mpv) application
|
||||
if (await Other.getFf2mpv()) {
|
||||
await chrome.runtime.sendMessage({ action: 'ff2mpv', url: url });
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { unpack } from './utils';
|
||||
import { Hosters } from './settings';
|
||||
import { Hosters, Redirect } from './settings';
|
||||
|
||||
export interface Match {
|
||||
name: string;
|
||||
@ -9,7 +9,7 @@ export interface Match {
|
||||
regex: RegExp;
|
||||
notice?: string;
|
||||
|
||||
match(match: RegExpMatchArray): Promise<string>;
|
||||
match(match: RegExpMatchArray): Promise<string | null>;
|
||||
}
|
||||
|
||||
export const Doodstream: Match = {
|
||||
@ -141,6 +141,21 @@ export const Newgrounds: Match = {
|
||||
}
|
||||
};
|
||||
|
||||
export const StreamA2z: Match = {
|
||||
name: 'Stream2Az',
|
||||
id: 'stream2az',
|
||||
domains: ['streama2z.com', 'streama2z.xyz'],
|
||||
regex: /https?:\/\/\S*m3u8.+(?=['"])/gm,
|
||||
|
||||
match: async (match: RegExpMatchArray) => {
|
||||
if (StreamA2z.domains.indexOf(window.location.hostname) !== -1) {
|
||||
await Redirect.set(StreamA2z);
|
||||
return null;
|
||||
}
|
||||
return match[0];
|
||||
}
|
||||
};
|
||||
|
||||
export const Streamtape: Match = {
|
||||
name: 'Streamtape',
|
||||
id: 'streamtape',
|
||||
@ -252,6 +267,7 @@ export const matches = {
|
||||
[Mixdrop.id]: Mixdrop,
|
||||
[Mp4Upload.id]: Mp4Upload,
|
||||
[Newgrounds.id]: Newgrounds,
|
||||
[StreamA2z.id]: StreamA2z,
|
||||
[Streamtape.id]: Streamtape,
|
||||
[Streamzz.id]: Streamzz,
|
||||
[SuperVideo.id]: SuperVideo,
|
||||
|
Loading…
x
Reference in New Issue
Block a user