您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically redirects to another Nitter instance if the one you're directed to has reached its rate limit/quota or has an error.
// ==UserScript== // @name Automatic Nitter Quota & Error Redirector // @namespace happyviking // @version 1.6.0 // @grant none // @run-at document-end // @license MIT // @description Automatically redirects to another Nitter instance if the one you're directed to has reached its rate limit/quota or has an error. // @icon https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Nitter_logo.svg/1024px-Nitter_logo.svg.png // @author HappyViking // <<INSTANCES START HERE>> // @match https://lightbrd.com/* // @match https://nitter.net/* // @match https://nitter.poast.org/* // @match https://nitter.privacyredirect.com/* // @match https://nitter.space/* // @match https://nitter.tiekoetter.com/* // @match https://xcancel.com/* // @match https://nitter.privacydev.net/* // @match https://nitter.lucabased.xyz/* // <<INSTANCES END HERE>> // ==/UserScript== function tryNewInstance(messageHolder) { const addedMessage = document.createElement("p") addedMessage.textContent = "Redirecting you to new instance..." messageHolder.appendChild(addedMessage) location.replace('https://farside.link/nitter/' + window.location.pathname + window.location.search); } function checkForRateLimit() { const errorPanel = document.getElementsByClassName("error-panel").item(0) if (!errorPanel) return; const errorMessage = errorPanel.querySelector("span")?.innerHTML if (!errorMessage) return if (errorMessage.includes("Instance has been rate limited.")) { tryNewInstance(errorPanel) } } function checkFor429() { const centerPanel = document.querySelector("center") if (!centerPanel) return const errorMessage = centerPanel.querySelector("h1")?.innerHTML if (!errorMessage) return if (errorMessage.includes("429 Too Many Requests")) { tryNewInstance(centerPanel) } } checkForRateLimit() checkFor429()