Bypass acortalink.me

Bypass acortalink.me link shortener

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Bypass acortalink.me
// @namespace   Violentmonkey Scripts
// @match       *://acortalink.me/*
// @grant       none
// @version     2.1
// @author      Rust1667
// @description Bypass acortalink.me link shortener
// @run-at     document-start
// ==/UserScript==

function bypassAcortaLink() {
    let acorta = setInterval(() => {
        let script = document.querySelector('body > script');
        if (script) {
            let text = script.text.trim();
            let lines = text.split('\n');
            let i = lines.findIndex(x => x.includes('acortalink.me'));
            let link = lines[i + 2]?.trim().split(',')[6]?.trim();

            if (link && window[link]) {
                clearInterval(acorta);

                // Redirect to the link
                window.location.href = window[link];

                //Open alert if it is a magnet link
                if (window[link].startsWith("magnet:?")) {
                  alert(window[link]);
                }
            }
        }
    }, 100);
}

bypassAcortaLink();