Discourse Prevent Jump on Reply

Prevent Discourse from jumping after posting a reply by intercepting the reply button click and forcing shiftKey, keeping scroll position and context.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

Autor
Pipecraft
Dnevne instalacije
0
Ukupnih instalacija
1
Ocjene
0 0 0
Verzija
0.1.4
Stvoreno
03.12.2025.
Ažurirano
23.12.2025.
Size
6,45 KB
Licenza
MIT
Primjenjuje se

Discourse Prevent Jump on Reply

Prevent Discourse from jumping to the latest post after you submit a reply. The script intercepts reply actions and forces shiftKey behavior to keep your current scroll position and context. Includes a per‑site toggle and auto language for the UI label.

中文版

screencapture

Features

  • Prevents post‑submission jump; keeps current position
  • Intercepts both reply button clicks and Cmd/Ctrl + Enter hotkey
  • Per‑site toggle next to the reply button; off by default
  • Toggle state persisted per domain via userscript storage (GM.getValue/GM.setValue)
  • Auto label language (English/Simplified Chinese) based on Discourse UI language

Supported Sites

Runs on these Discourse forums:

Installation

  1. Install a user script manager:
  2. Install the script:

Usage

  • On the reply composer, a checkbox appears next to the reply button:
    • Label: “Prevent jump to latest post” (auto‑localized)
    • Default: Off
    • When enabled, the script intercepts reply actions and keeps position
  • Works for both clicking the reply button and pressing Cmd/Ctrl + Enter
  • Shift override: if you manually hold Shift, the script does not alter behavior

Compatibility

Tested on modern browsers with Tampermonkey/Violentmonkey and Discourse‑based forums.

Changelog

v0.1.4

  • Delete @noframes declaration, compatible with utags-shortcuts in iframe mode

v0.1.0

  • Initial release: button and hotkey interception, per‑site toggle, auto language

More Useful Scripts

🏷️ UTags - Add User Tags to Links

  • Link: Greasy Fork
  • Features: Add custom tags and notes to user, post, video and other links
  • Highlights: Support special tag filtering (like spam, block, clickbait, etc.), data export/import, auto-mark viewed posts
  • Supported Sites: V2EX, X(Twitter), Reddit, GitHub, Bilibili, Zhihu, Linux.do, Youtube and 50+ websites
  • Description: Super useful tag management tool for adding tags to forum users or posts, making it easy to identify or block low-quality content

🧰 UTags Advanced Filter

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Real-time filtering and hiding of scripts on GreasyFork
  • Highlights: Available as both a userscript and a browser extension
  • Supported Sites: Greasy Fork
  • Description: A tool that supports real-time filtering and hiding on GreasyFork, available in userscript and browser extension versions

⚡ UTags Shortcuts

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Per-site grouping, icon support, floating or sidebar navigation panel
  • Highlights: Floating/Sidebar modes, URL/JS script support, visual editor, keyboard shortcuts
  • Supported Sites: All websites
  • Description: A powerful userscript that streamlines your browsing workflow with a customizable navigation panel for quick access to favorite links and scripts

🔗 Links Helper

  • Link: Greasy Fork
  • Features: Open third-party website links in new tabs, parse text links into hyperlinks
  • Highlights: Support custom rules, parse Markdown and BBCode formats, convert image links to image tags
  • Supported Sites: Universal for all websites, including Google, YouTube, GitHub, V2EX, etc.
  • Description: Enhance link browsing experience, automatically process various link formats for more convenient web browsing

🔍 Find Scripts For This Site

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Quickly find scripts for the current site across multiple repositories
  • Highlights: Settings dialog, real-time sync, smart domain extraction
  • Supported Sites: All websites
  • Description: A user script to quickly find scripts for the current site across multiple repositories, now with a settings dialog and real-time sync across tabs

License

MIT License — see the repository LICENSE file.

Contributing

Issues and pull requests are welcome!

Related Links