From b0d8e9b2237eb8f71a0ac2409877a3db6435f069 Mon Sep 17 00:00:00 2001 From: "Tim \"timmyRS\" Speckhals" Date: Mon, 2 Mar 2020 04:49:23 +0100 Subject: [PATCH] Add general bypass for torrentmegafilmes.tv, filmesmega.net, and potentially more (closes #989) --- injection_script.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/injection_script.js b/injection_script.js index 753b27a..1f688d3 100644 --- a/injection_script.js +++ b/injection_script.js @@ -13,7 +13,7 @@ transparentProperty=(name,valFunc)=>{ }) }, isGoodLink=link=>{ - if(!link||link.split("#")[0]==location.href.split("#")[0]||link.substr(0,6)=="about:"||link.substr(0,11)=="javascript:")//jshint ignore:line + if(typeof link!="string"||link.split("#")[0]==location.href.split("#")[0]||link.substr(0,6)=="about:"||link.substr(0,11)=="javascript:")//jshint ignore:line { return false } @@ -1863,6 +1863,16 @@ ensureDomLoaded(()=>{ }) clearInterval(dT) } + if(typeof redirectpage!="undefined"&&typeof CryptoJS!="undefined") + { + document.querySelectorAll("a[href^='"+redirectpage+"']").forEach(a=>{ + let url=CryptoJS.AES.decrypt(atob(new URL(a.href).searchParams.get("token")),"391si8WU89ghkDB5").toString(CryptoJS.enc.Utf8) + if(isGoodLink(url)) + { + a.href=url + } + }) + } //Insertion point for bypasses detecting certain DOM elements which may appear up to 10 seconds after page load. Bypasses here will no longer need to call ensureDOMLoaded. },100) setTimeout(()=>clearInterval(dT),10000)