summaryrefslogtreecommitdiff
path: root/static/userscripts/localjump.user.js
diff options
context:
space:
mode:
authorchers <admin@tilde.tailb619f6.ts.net>2026-07-31 09:18:39 +0000
committerchers <admin@tilde.tailb619f6.ts.net>2026-07-31 09:18:39 +0000
commit7023e4c7c8f158df78b5e71ddc2640290409eca1 (patch)
tree077fb46bdb484bbbf7f9a81fd1d512f66650be10 /static/userscripts/localjump.user.js
Update cl-bbsHEADmaster
Diffstat (limited to 'static/userscripts/localjump.user.js')
-rw-r--r--static/userscripts/localjump.user.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/static/userscripts/localjump.user.js b/static/userscripts/localjump.user.js
new file mode 100644
index 0000000..8c6274e
--- /dev/null
+++ b/static/userscripts/localjump.user.js
@@ -0,0 +1,17 @@
+// ==UserScript==
+// @name localjump
+// @author Anon
+// @namespace http://textboard.org
+// @description Change single post quote links inside full thread views from separate single post views to local scroll jumps within the thread
+// @version 1
+// @match *://textboard.org/*
+// @grant none
+// ==/UserScript==
+(function() {
+ 'use strict';
+ Array.from (document.getElementsByTagName ("a")).filter (e => e.hasAttribute ("href")).forEach (e => {
+ var h = e.getAttribute ("href")
+ var s = h.replace (/^\/([^\/]+)\/(\d+)\/(\d+)$/, "/$1/$2#t$2p$3")
+ if (h != s) { e.setAttribute ("href", s); }
+})
+})();