Reddit - fix "new"

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

Fejlesztő
Achernar
Napi telepítések
1
Telepítések száma
126
Értékelések
0 0 0
Verzió
0.6.11
Létrehozva
2024.05.02.
Frissítve
2024.09.24.
Licensz
Ismeretlen
Érvényes
Update 2024/06/18: Reddit has now enabled "long-lived page" everywhere. Hence, the update today disables "Trigger LLP" if it is enabled. It will be disabled by default for new installations.
FIX: Also, the loading sign is now correctly hidden. (bug mostly in FF) You can try it again. It should work correctly (hopefully).



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.", "old." and modmail pages.

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()}})()