[ prog / sol / mona ]

prog


What are you working on?

98 2020-02-20 00:28

To change single post quote links inside full thread views from separate single post views to local scroll jumps within the thread, while leaving other links untouched:

Array.from (document.getElementsByTagName ("a")).filter (e => e.hasAttribute ("href")).forEach (e => {
  h = e.getAttribute ("href")
  s = h.replace (/^\/([^\/]+)\/(\d+)\/(\d+)$/, "/$1/$2#t$2p$3")
  if (h != s) { e.setAttribute ("href", s); }
})

The operation is idempotent. To get the previous behavior back reload the thread.

199


VIP:

do not edit these