Greasy Fork

持久的旧版 Reddit

提供贯穿整个浏览过程的稳定旧版 Reddit 用户界面体验。

目前为 2025-04-15 提交的版本。查看 最新版本

// ==UserScript==
// @name            Persistently Old Reddit
// @description     Provides a consistent experience of the old Reddit UI throughout browsing.
// @name:zh-TW      永久舊版 Reddit
// @description:zh-TW 提供一個穩定的舊版 Reddit 用戶介面體驗,貫穿整個瀏覽過程。
// @name:zh-HK      永久舊版 Reddit
// @description:zh-HK 提供一個穩定的舊版 Reddit 用戶介面體驗,貫穿整個瀏覽過程。
// @name:zh-CN      持久的旧版 Reddit
// @description:zh-CN 提供贯穿整个浏览过程的稳定旧版 Reddit 用户界面体验。
// @name:ja         永続的な旧版 Reddit
// @description:ja Reddit の古い UI の一貫した体験を、ブラウジング全体で提供します。
// @name:kr         지속적으로 구형 Reddit
// @description:kr 브라우징하는 동안 구형 Reddit UI의 일관된 경험을 제공합니다.
// @name:ar         Reddit القديم بشكل دائم
// @description:ar يوفر تجربة ثابتة لواجهة المستخدم القديمة في Reddit طوال التصفح.
// @name:bg         Постоянно стар Reddit
// @description:bg Осигурява последователно изживяване на старата Reddit потребителска интерфейс през цялото сърфиране.
// @name:cs         Trvale starý Reddit
// @description:cs Poskytuje konzistentní zážitek ze starého rozhraní Redditu během celého prohlížení.
// @name:da         Vedvarende gamle Reddit
// @description:da Giver en konsistent oplevelse af det gamle Reddit UI under hele browseroplevelsen.
// @name:de         Beständig altes Reddit
// @description:de Bietet eine konsistente Erfahrung mit der alten Reddit-Benutzeroberfläche während des gesamten Surfens.
// @name:tel        శాశ్వతంగా పాత Reddit
// @description:tel బ్రౌజింగ్ చేస్తుండగా పాత Reddit UI యొక్క స్థిరమైన అనుభవాన్ని అందిస్తుంది.
// @name:es         Reddit Antiguo Persistente
// @description:es Proporciona una experiencia consistente de la antigua interfaz de usuario de Reddit durante toda la navegación.
// @name:en         Persistently Old Reddit
// @description:en Provides a consistent experience of the old Reddit UI throughout browsing.
// @name:fr         Reddit Ancien Persistant
// @description:fr Offre une expérience cohérente de l'ancienne interface Reddit tout au long de la navigation.
// @name:fr-CA      Reddit Ancien Persistant
// @description:fr-CA Offre une expérience cohérente de l'ancienne interface Reddit tout au long de la navigation.
// @name:he         Reddit הישן באופן עקבי
// @description:he מספק חוויית שימוש עקבית של הממשק הישן של Reddit לאורך כל הגלישה.
// @name:hu         Tartós régi Reddit
// @description:hu Folyamatos élményt biztosít a régi Reddit felhasználói felületen a böngészés során.
// @name:id         Reddit Lama Secara Persisten
// @description:id Memberikan pengalaman konsisten dari antarmuka pengguna Reddit lama selama browsing.
// @name:it         Reddit Persistente e Vecchio
// @description:it Fornisce un'esperienza coerente dell'interfaccia utente di Reddit vecchia durante tutta la navigazione.
// @name:ko         지속적인 구버전 Reddit
// @description:ko Reddit의 오래된 UI를 브라우징하는 동안 일관된 경험을 제공합니다.
// @name:nb         Vedvarende gammel Reddit
// @description:nb Gir en konsekvent opplevelse av det gamle Reddit-grensesnittet gjennom hele nettlesingen.
// @name:nl         Blijvend Oude Reddit
// @description:nl Biedt een consistente ervaring van de oude Reddit-interface tijdens het browsen.
// @name:pl         Trwały Stary Reddit
// @description:pl Zapewnia spójną doświadczenie starego interfejsu Reddita podczas przeglądania.
// @name:pt-BR      Reddit Antigo Persistente
// @description:pt-BR Proporciona uma experiência consistente da interface antiga do Reddit durante toda a navegação.
// @name:ro         Reddit vechi persistent
// @description:ro Oferă o experiență constantă a interfeței vechi Reddit pe parcursul întregii navigări.
// @name:ru         Постоянный старый Reddit
// @description:ru Обеспечивает постоянный опыт использования старого интерфейса Reddit на протяжении всего серфинга.
// @name:sk         Trvalý starý Reddit
// @description:sk Poskytuje konzistentný zážitok zo starej Reddit používateľskej rozhrania počas celého prehliadania.
// @name:sr         Trajni Stari Reddit
// @description:sr Pruža konzistentno iskustvo starog Reddit UI tokom celog pretraživanja.
// @name:sv         Beständigt gamla Reddit
// @description:sv Ger en konsekvent upplevelse av det gamla Reddit-gränssnittet under hela webbläsarupplevelsen.
// @name:th         Reddit เก่าอย่างถาวร
// @description:th ให้ประสบการณ์ที่สม่ำเสมอจาก UI ของ Reddit เก่าในระหว่างการท่องเว็บทั้งหมด.
// @name:tr         Sürekli Eski Reddit
// @description:tr Tarayıcıda gezinme sırasında eski Reddit UI'sinin tutarlı bir deneyimini sunar.
// @name:uk         Постійний старий Reddit
// @description:uk Забезпечує послідовний досвід використання старого інтерфейсу Reddit протягом всього перегляду.
// @name:ug         داىملىق ئىشلىتىلىدىغان قەدىمكى Reddit
// @description:ug بوشلۇق بويىچە Reddit نىڭ قەدىمكى UI نى تۇراقلىق تەجرىبە بىلەن تەمىنلەيدۇ.
// @name:vi         Reddit Cũ Liên Tục
// @description:vi Cung cấp trải nghiệm nhất quán về giao diện Reddit cũ trong suốt quá trình duyệt web.
// @version         0.1.3
// @author          PolyMegos (https://github.com/polymegos)
// @namespace       https://github.com/polymegos/persistently-old-reddit
// @supportURL      https://github.com/polymegos/persistently-old-reddit/issues
// @license         MIT
// @match           *://reddit.com/*
// @match           *://www.reddit.com/*
// @run-at          document-start
// @grant           none
// @compatible      chrome
// @compatible      firefox
// @compatible      opera
// @compatible      edge
// @compatible      safari
// ==/UserScript==

(function() {
    'use strict';
    // Redirect as early as possible
    if (location.hostname !== 'old.reddit.com' && !location.pathname.startsWith('/media')) {
        window.stop(); // halt newer reddit page load
        const newUrl = 'https://old.reddit.com' + location.pathname + location.search + location.hash;
        location.replace(newUrl); // avoid adding to browser history
    }
})();