WarezBookLC - Warez Link Checker (Updated 2023)

Automatically checks for dead links from various file hosting services.

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

Review: Good - script works

§
Posted: 2019-09-07

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;
            }

        },        
    });
}

Post reply

Sign in to post a reply.