Fixed vivo.sx / vivo.st regex and unwanted return

This commit is contained in:
bytedream 2021-09-13 17:13:49 +02:00
parent f0f8bc9189
commit 038f708b36
2 changed files with 3 additions and 5 deletions

View File

@ -24,8 +24,6 @@ chrome.storage.local.get(['all', 'disabled'], function (result) {
re = document.body.innerHTML.match(regex)
}
return
if (matchClass === null) {
if (regex === null) {
location.assign(document.body.innerHTML)

View File

@ -38,7 +38,7 @@ class TheVideoMe implements Match {
class Vivo implements Match {
async match(match: RegExpMatchArray): Promise<string> {
return this.rot47(decodeURIComponent(match[1]))
return this.rot47(decodeURIComponent(match[0]))
}
// decrypts a string with the rot47 algorithm (https://en.wikipedia.org/wiki/ROT13#Variants)
@ -71,8 +71,8 @@ const matches = [
['thevideome.com', new RegExp(/(?<=\|)\w{2,}/gm), new TheVideoMe()],
['vidlox.me', new RegExp(/(?<=\[")\S+?(?=")/gm), null],
['vidoza.net', new RegExp(/(?<=src:(\s*)?")\S*(?=")/gm), null],
['vivo.st', new RegExp(/source:\s*'(\S+)'/gm), new Vivo()],
['vivo.sx', new RegExp(/source:\s*'(\S+)'/gm), new Vivo()],
['vivo.st', new RegExp(/(?<=source:\s')(\S+)(?=')/gm), new Vivo()],
['vivo.sx', new RegExp(/(?<=source:\s')(\S+)(?=')/gm), new Vivo()],
['voe.sx', new RegExp(/https?:\/\/\S*m3u8(?=")/gm), null],
['vupload.com', new RegExp(/(?<=class\|)\w*/gm), new Vupload()]
]