From aa51b5d95ffa16a4ddde8daa66af647a47f90748 Mon Sep 17 00:00:00 2001 From: bytedream Date: Thu, 16 Jun 2022 19:23:13 +0200 Subject: [PATCH] Remove old and not working websites --- src/manifest.json | 4 ---- src/match/match.ts | 58 +++++++++++++--------------------------------- 2 files changed, 16 insertions(+), 46 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index e8e0fae..f465634 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -15,17 +15,13 @@ "all_frames": true, "matches": [ "*://*.evoload.io/*", - "*://*.mcloud.to/*", "*://*.mixdrop.co/*", "*://*.newgrounds.com/*", "*://*.streamtape.com/*", "*://*.streamzz.to/*", - "*://*.thevideome.com/*", "*://*.upstream.to/*", "*://*.vidlox.me/*", - "*://*.vidstream.pro/*", "*://*.vidoza.net/*", - "*://*.vivo.st/*", "*://*.vivo.sx/*", "*://*.voe.sx/*", "*://*.voeunblk.com/*", diff --git a/src/match/match.ts b/src/match/match.ts index 99bf4d5..ad52d7a 100644 --- a/src/match/match.ts +++ b/src/match/match.ts @@ -12,7 +12,6 @@ export abstract class Match { regex: RegExp abstract match(match: RegExpMatchArray): Promise - locked?: boolean notice?: string } @@ -40,28 +39,6 @@ class Evoload implements Match { } } -class MCloud implements Match { - name = 'MCloud' - id = 'mcloud' - reliability = Reliability.HIGH - domains = [ - 'mcloud.to' - ] - regex = new RegExp(/(?<=')\w+(?=';)/gm) - - async match(match: RegExpMatchArray): Promise { - const code = window.location.pathname.split('/').slice(-1)[0] - const response = await fetch(`https://mcloud.to/info/${code}?skey=${match[0]}`, { - headers: { - 'Content-Type': 'application/json' - }, - referrer: `https://mcloud.to/embed/${code}` - }) - const json = await response.json() - return json['media']['sources'][0]['file'] - } -} - class Mixdrop implements Match { name = 'Mixdrop' id = 'mixdrop' @@ -76,6 +53,20 @@ class Mixdrop implements Match { } } +/*class Mp4Upload implements Match { + name = 'Mp4Upload' + id = 'mp4upload' + reliability = Reliability.LOW + domains = [ + 'mp4upload.com' + ] + regex = new RegExp(/(?<=\|)\w{2,}/gm) + + async match(match: RegExpMatchArray): Promise { + return `https://${match[34]}.mp4upload.com:${match[89]}/d/${match[88]}/video.mp4` + } +}*/ + class Newgrounds implements Match { name = 'Newgrounds' id = 'newgrounds' @@ -125,20 +116,6 @@ class Streamzz implements Match { } } -class TheVideoMe implements Match { - name = 'TheVideoMe' - id = 'thevideome' - reliability = Reliability.NORMAL - domains = [ - 'thevideome.com' - ] - regex = new RegExp(/(?<=\|)\w{2,}/gm) - - async match(match: RegExpMatchArray): Promise { - return `https://thevideome.com/${match[5]}.mp4` - } -} - class Upstream implements Match { name = 'Upstream' id = 'upstream' @@ -206,12 +183,11 @@ class Vidoza implements Match { class Vivo implements Match { name = 'Vivo' id = 'vivo' - reliability = Reliability.HIGH + reliability = Reliability.LOW domains = [ - 'vivo.st', 'vivo.sx' ] - regex = new RegExp(/(?<=source:\s')(\S+)(?=')/gm) + regex = new RegExp(/(?<=source:\s')(\S+)(?=')/gms) async match(match: RegExpMatchArray): Promise { return this.rot47(decodeURIComponent(match[0])) @@ -263,12 +239,10 @@ class Vupload implements Match { export const matches = [ new Evoload(), - new MCloud(), new Mixdrop(), new Newgrounds(), new Streamtape(), new Streamzz(), - new TheVideoMe(), new Upstream(), new Vidlox(), new Vidoza(),