Greasy Fork

Greasy Fork is available in English.

lanza.me bypass

bypass lanza.me shortlink

当前为 2024-01-12 提交的版本,查看 最新版本

// ==UserScript==
// @name         lanza.me bypass
// @namespace    http://greasyfork.icu/users/980489
// @version      1.0
// @description  bypass lanza.me shortlink
// @author       Rust1667
// @match        https://lanza.me/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to extract the link from the specified selector
    function getRedirectLink() {
        var button = document.querySelector('#botonGo');
        if (button) {
            return button.getAttribute('href');
        }
        return null;
    }

    // Function to redirect the page
    function redirectPage() {
        var redirectLink = getRedirectLink();
        if (redirectLink) {
            window.location.href = redirectLink;
        }
    }

    // Check if the page matches the specified pattern
    if (window.location.href.startsWith('https://lanza.me/')) {
        // Redirect the page when it's fully loaded
        window.addEventListener('load', redirectPage);
    }
})();