Greasy Fork is available in English.

Reddit - Subs - default sort

Apply default sort to subs listing (feature missing in SHreddit)

ผู้เขียน
Achernar
จำนวนติดตั้งประจำวัน
0
จำนวนติดตั้งทั้งหมด
1
คะแนน
1 0 0
เวอร์ชัน
0.5
สร้างเมื่อ
22-01-2025
อัปเดตเมื่อ
23-01-2025
Size
5.51 กิโลไบต์
สัญญาอนุญาต
ไม่มี
ปรับใช้กับ

With this userscript you can set a default sort order for posts in sub-reddits and on the homepage. It does that by rewriting all internal links on the reddit page.

You can set (or not) a global sort order for all subs. They will open in that order in place of SHreddit current default ("Hot").
Once you change the sort order of a sub-reddit (using SHreddit dropdown menu), the script uses it as the new default for that sub. Other subs will still use the global default.
The homepage order can also be stored (with the dropdown menu). The difference is that is doesn't use the global sort order. By default it is SHreddit's default ("Best").

The script also has an option to automatically redirect the to its order when a tab is opened with a link to an unsorted sub-reddit.

You can access the option by double-clicking the 15x15 pixels area at the top-left corner of the site (here displayed in yellow).



It will display a first prompt for default sort.


Hitting "Esc" or clicking "Cancel" ignores any modification.
Inputting an invalid value will result in the same prompt to be displayed again.

Once that prompt has been filled or bypassed, a second one will ask you if you want to redirect the landing page to the stored sort order (if applicable).

  • An empty field means no redirect
  • "True" or any undefined value means redirect if no order is specified in the url
  • "Force" means redirect to the stored sort order even in an order is in the url
  • "Ask" if you want the script to ask you if you want the page to be redirected. Works if the tab is in focus. Pages opened in the background are not redirected.