Greasy Fork 还支持 简体中文。

Discourse Topic Quick Switcher

Enhance Discourse forums with instant topic switching, current topic highlighting, and smart theme detection

Version au 28/09/2025. Voir la dernière version.

Vous devrez installer une extension telle que Tampermonkey, Greasemonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Userscripts pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension de gestionnaire de script utilisateur pour installer ce script.

(J'ai déjà un gestionnaire de scripts utilisateur, laissez-moi l'installer !)

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

(J'ai déjà un gestionnaire de style utilisateur, laissez-moi l'installer!)

Auteur
Pipecraft
Notes
0 0 0
Version
0.1.1
Créé
28/09/2025
Mis à jour
28/09/2025
Taille
37,2 ko
Licence
MIT
S'applique à

Discourse Topic Quick Switcher

A powerful user script that brings seamless topic navigation, intelligent current topic highlighting, and adaptive theme switching to Discourse forums. Browse your favorite forums with unprecedented speed and efficiency.

Features

  • Topic List Caching: Automatically caches the topic list when you visit a list page.
  • Quick Access: Access the cached list from any topic page via:
    • A floating button in the bottom-right corner
    • A keyboard shortcut (backtick key `)
  • User-Friendly Interface:
    • Displays cache time and source information
    • Navigate directly to topics from the popup panel
    • Close with the ESC key, a close button, or by clicking outside the panel
    • Highlights the current topic for easy identification
    • Automatically scrolls to the current topic in the list
  • Smart Theme Detection:
    • Automatically adapts to light/dark mode based on system and site preferences
  • Cache Management:
    • 1-hour cache expiration with a visual indicator
    • Source link to return to the original list page

Installation

  1. Install a user script manager like Tampermonkey or Violentmonkey
  2. Click here to install this script
  3. Visit any Discourse forum and enjoy the enhanced navigation experience!

Usage

  1. Cache a Topic List:

    • Visit any Discourse forum topic list page (Latest, New, Categories, etc.)
    • The script will automatically cache the current list
  2. View the Cached List:

    • While viewing a topic, you can:
      • Click the floating button in the bottom-right corner
      • Press the backtick key (`)
    • A popup will appear showing the cached topic list
  3. Navigate Between Topics:

    • Click any topic in the popup to navigate to it
    • The popup will automatically close after selection
  4. Close the Popup:

    • Click the × button
    • Press the ESC key
    • Click outside the popup

Configuration

You can modify the following settings at the top of the script:

const CONFIG = {
  // Keyboard shortcut (default: backtick key)
  HOTKEY: '`',
  // Cache key name
  CACHE_KEY: 'discourse_topic_list_cache',
  // Cache expiration time (in milliseconds) - 1 hour
  CACHE_EXPIRY: 60 * 60 * 1000,
  // Whether to show the floating button on topic pages
  SHOW_FLOATING_BUTTON: true,
  // Route check interval (in milliseconds)
  ROUTE_CHECK_INTERVAL: 500,
  // Whether to automatically follow system dark mode
  AUTO_DARK_MODE: true,
}

Compatibility

This script is designed for all Discourse forums and has been tested on the following browsers:

  • Chrome
  • Firefox
  • Safari

Release Notes

v0.1.0

  • Initial release
  • Basic topic list caching functionality
  • Floating button for quick access
  • Keyboard shortcut support
  • Cache expiration indicator
  • Added current topic highlighting
  • Added auto-scrolling to the current topic
  • Added closing the list by clicking outside of it
  • Improved dark mode support with automatic theme detection

License

MIT License - see the LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit a pull request.