🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2026/01/14 08:21:06
🔄 下次更新时间:2026/01/14 09:21:06
手动刷新缓存

Reddit old.reddit button

Add button to redirect post to old.reddit.com

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         Reddit old.reddit button
// @namespace    https://www.reddit.com
// @version      1.0
// @description  Add button to redirect post to old.reddit.com
// @author       Agreasyforkuser
// @match        https://www.reddit.com/*
// @match        https://new.reddit.com/*
// @icon         https://www.redditstatic.com/desktop2x/img/favicon/android-icon-192x192.png
// @license      MIT
// ==/UserScript==

'use strict';

function changeUrl() {
    // Replace "www" or "new" with "old" in the current URL
    var oldUrl = window.location.href;
    var newUrl = oldUrl.replace(/www|new/, 'old');

    // Open the new URL in the same window
    window.location.href = newUrl;
}

function createChangeUrlButton() {
    var button = document.createElement('button');
    button.innerHTML = 'old.reddit';
    button.style.color = 'white';
    button.style.background = 'black';
    button.style.border = 'none';
    button.style.fontSize = 'inherit';
    button.style.zIndex = "9999999";
    button.style.position = "fixed";
    button.style.top = "0";
    button.onclick = changeUrl;

    // Add the button to the document body
    document.body.appendChild(button);
}

// Call the function to create the "Change URL" button
createChangeUrlButton();