Greasy Fork is available in English.

Reddit - fix "new"

Fix "new" reddit behaviour: long-lived page, internal links, moderator page

Autor
Achernar
Instalações hoje
0
Total de instalações
8
Avaliações
0 0 0
Versão
0.3.0
Criado
02/05/2024
Atualizado
03/05/2024
Licença
N/A
Aplicável a

Some of you are still using "new.reddit" instead of "www.reddit", or have left it with regrets. Here is a userscript to fix its behavior and other things broken when it was replaced by "sh" on "www".

I still dislike "sh" with its bugs and shortcomings. (lacks of some infos, functions, ...).

On "new" the long-lived page behavior has been broken. Posting or replying triggers it, The userscript uses this trick.

The userscript also fixes the remaining links to "www". It fixes the notifications as well as (driven by options, some enabled) the page interface, the "www" links in posts/comments, and the "old" links in posts/comments (off by default).

(Moderation tool) - It fixes links in Modmail (on by default) too.
(Moderation tool) - It restores (option on by default) the previous "Mod Log" link in the left menu of the mod page (to continue to use the long-lived page behavior for it too). By default it leaves the menu item to the new "sh."version (can be hidden by an option).

The userscript options dialog can be triggered from Tampermonkey toolbar icon: "Settings" menu item attached to the userscript name. This menu item is available on "new.", "www." and modmail pages. (not on "old.")

The dialog can also be triggered in the user menu on "new.", by clicking the "double eyes" icon (labelled "View Options").

Note: the LLP trick triggers the display of the new post form. You can hide the visual effect by setting an option.


Here are bookmarklets that can be useful to go from one site to another. Create a bookmark and paste the following code in the URL part (starting with "javascript:...").

  • switch to "new":
    javascript:(function(){if (location.host.endsWith('.reddit.com') && (location.host !='new.reddit.com') ) location.host='new.reddit.com';})()

  • switch to "old":
    javascript:(function(){if (location.host.endsWith('.reddit.com') && (location.host !='old.reddit.com') ) location.host='old.reddit.com';})()

  • switch to "sh":
    javascript:(function(){if (location.host.endsWith('.reddit.com') && (location.host !='sh.reddit.com') ) location.host='sh.reddit.com';})()

  • switch to "www" (different method which works when this userscript is running):
    javascript:(function(){if (location.host.endsWith('.reddit.com') && (location.host !='www.reddit.com') ) {var a=document.createElement('a'); a.href=location.href.replace(/^(.*?reddit.com)/, 'https://www.reddit.com' ); a.rel='noreferrer'; a.click()}})()