GitHub Sort Reactions

A userscript that sorts comments by reaction

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Mottie
今日安裝
0
安裝總數
57
評價
3 0 0
版本
0.2.17
建立日期
2018-02-11
更新日期
2024-02-17
尺寸
10.7 KB
授權條款
MIT
腳本執行於

A userscript that sorts comments by reaction

  • The userscript adds a block of buttons under the first post.
    • The sort block is not visible when an issue has less than 2 reactions.
    • Block Avatar:
      • The initial avatar shows an up & down arrow to indicate no default reaction or sort is applied.
      • Clicking on this avatar will toggle the view of the reaction selection block.
      • Once you choose a reaction from the block, it becomes your set preference and the block avatar.
      • A small round sort icon will appear in the bottom right corner. Clicking on it will change the sort.
    • Clicking on a sort reaction button or avatar sort icon will sort the comments by the selected reaction: "+1", "-1", "laugh", "hooray", "confused" and "heart".
    • One extra button is included (speak no evil ? monkey):
      • Clicking it will sort the comments using a calculated value based on all reactions for that comment.
      • The calculated values are as follows: "?", "?" & "❤️" = +1; "?" = +0.5; "?" = -0.5; "?" = -1.
    • The first click applies a descending sort, the second an ascending sort and the third click restores the comment order.
    • Comments without a reaction and comments with the same (calculated) number of reactions will be added depending on its original order (stable sort).
  • Progressively loaded comments:
    • The "load more comments" button will be moved to the top, immediately under the sort block. For easy access.
    • New comments are supposed to be included in the sort, but you may need to resort the column anyway. I'll troubleshoot the mutations script and fix this soon.

github-sort-reactions-block

github-sort-buttons

github-sort-reactions

Hosted with ♥ at GitHub