Greasy Fork 还支持 简体中文。

1337x fallback proxy when rate limited

Redirect the page if rate limited on 1337x.to

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         1337x fallback proxy when rate limited
// @version      1.0
// @description  Redirect the page if rate limited on 1337x.to
// @author       Rust1667
// @match        https://1337x.to/*
// @run-at       document-end
// @grant        none
// @icon         https://www.google.com/s2/favicons?sz=64&domain=1337x.to
// @namespace https://greasyfork.org/users/980489
// ==/UserScript==

(function() {
    'use strict';

    const fallbackProxy = '1337x-to.pages.dev';

    function isRateLimited() {
        const titleContainsAccessDenied = document.title.includes('Access denied');
        return titleContainsAccessDenied
    }

    function redirectIfRateLimited() {
        if (isRateLimited()) {
            const currentURL = window.location.href;
            const newURL = currentURL.replace('1337x.to', fallbackProxy);
            window.location.assign(newURL);
        }
    }

    redirectIfRateLimited();

})();