Greasy Fork is available in English.
自动将 SleazyFork 上不可用的链接重定向到 GreasyFork。
当前为
// ==UserScript==
// @name SleazyFork to GreasyFork Link Bridge
// @name:de SleazyFork zu GreasyFork Link-Brücke
// @name:fr SleazyFork to GreasyFork Link Bridge
// @name:es Enlace entre SleazyFork y GreasyFork
// @name:it SleazyFork to GreasyFork Link Bridge
// @name:ru SleazyFork — GreasyFork Связующее звено
// @name:zh-CN SleazyFork 到 GreasyFork 链接桥接
//
// @description Redirects unavailable links from SleazyFork to GreasyFork automatically.
// @description:de Leitet nicht verfügbare Links von SleazyFork automatisch auf GreasyFork weiter.
// @description:fr Redirige automatiquement les liens indisponibles de SleazyFork vers GreasyFork.
// @description:es Redirige automáticamente los enlaces no disponibles de SleazyFork a GreasyFork.
// @description:it Reindirizza automaticamente i link non disponibili da SleazyFork a GreasyFork.
// @description:ru Автоматически перенаправляет недоступные ссылки из SleazyFork в GreasyFork.
// @description:zh-CN 自动将 SleazyFork 上不可用的链接重定向到 GreasyFork。
//
// @version 0.0.5
// @author Wack.3gp (http://greasyfork.icu/users/4792)
// @copyright 2026+, Wack.3gp
// @namespace http://greasyfork.icu/users/4792
// @license CC BY-NC-SA-4.0; https://creativecommons.org/licenses/by-nc-sa/4.0/
// @icon https://sleazyfork.org/vite/assets/blacklogo16-DftkYuVe.png
//
// @match https://sleazyfork.org/*users/*
//
// @grant GM_xmlhttpRequest
// @connect sleazyfork.org
//
// @supportURL http://greasyfork.icu/scripts/576108/feedback
// @compatible Chrome tested with Tampermonkey
// @contributionURL https://www.paypal.com/donate?hosted_button_id=BYW9D395KJWZ2
// @contributionAmount €1.00
// ==/UserScript==
(function() {
'use strict';
const scriptItems = document.querySelectorAll('li[data-script-id]');
scriptItems.forEach(item => {
const link = item.querySelector('.script-link');
if (!link) return;
const fullUrl = link.href;
GM_xmlhttpRequest({
method: "HEAD",
url: fullUrl,
onload: function(response) {
if (response.status === 404) {
const allLinksInItem = item.querySelectorAll('a');
allLinksInItem.forEach(a => {
const currentHref = a.getAttribute('href');
if (currentHref) {
if (currentHref.startsWith('/')) {
a.href = "http://greasyfork.icu" + currentHref;
} else if (currentHref.includes('sleazyfork.org')) {
a.href = currentHref.replace('sleazyfork.org', 'greasyfork.org');
}
}
});
}
}
});
});
})();