WarezBookLC - Warez Link Checker (Updated 2023)

Automatically checks for dead links from various file hosting services.

< Feedback op WarezBookLC - Warez Link Checker (Updated 2023)

Recensie: Goed - het script werkt zoals het hoort

§
Geplaatst: 07-09-2019

how to autocheck when link change?

i use my script

redirect link change original url

somesite link address

testsite.com/dl?php=code testsite.com/redirect?php=code

to

https://rapidgator.net/file/code

// ==UserScript==
// @name         Original URL
// @match        https://test/*
// @connect      *
// @grant        GM_xmlhttpRequest
// @run-at       document-start
// ==/UserScript==

window.onload = () => {
    var items = document.querySelectorAll('a[href*="dl?url"]');
    for(var i=0; i < items.length; i++) {
        processRedirectorLink(items[i]);
    }
    //event.detail.index
};

function processRedirectorLink(link){
    GM_xmlhttpRequest({
        method: 'HEAD',
        url: link.href,        
        onload: function(result) {
            if (result.finalUrl == link.href) // service hasn't redirected anywhere
            {
                console.log(result);
                setTimeout(function () {processRedirectorLink(link);}, 500);
            }
            else {
                link.href = result.finalUrl;
            }

        },        
    });
}

Reactie plaatsen

Log in om antwoord te geven.