Mystic Sorting - A script that adds sorting buttons to the Mystic Scouts' Log

The Mystic section of the Scouts’ Log does not have sorting buttons that allow to sort by cell names, cell ID, cell status, Player A/Player B names, or time. This script adds these buttons. Additionally, it adds information about how many Player A and Player B cells played by the current user are being shown. For example: If the player selects the “Need Admin” section, and they have played 25 of the Player A cells in that list, they will see “Player A (Yours: 25)” at the top of that column. Below is a showcase of the script in action. Feedback is welcome!

Download and installation: https://github.com/bl4ckscor3/MysticSorting

4 Likes

Really reaaaaly cool ! Thanks for this function :grinning:

1 Like

I just released an update that fixes a bug where the jump buttons no longer work after sorting.

1 Like

This is awesome, thanks bl4ckscor3!! :ok_hand: This will help me prioritize cells that may need the most attention (usually the ones that have been waiting the longest). I have only one further suggestion… Do you think you could make it so that the columns remain in the same sorted state when the mystic log is closed and reopened (or when the user switches between tabs in the log)? Or would that be too tricky or not possible on the client side?

2 Likes

Not tricky at all! I updated the script with this functionality :slight_smile:

3 Likes

Really cool, thanks ! i was wondering and saw twister request and you answering and the script updated :grinning: :upside_down_face: :hugs: :partying_face:

1 Like

Updated the script to fix a bug where cells whose cell names have brackets in them (like the ones in the image) do not get properly sorted when sorting by cell id.

Whenever i try to open the Scouts’ Log (the normal one, not the Mystics list of cells), the list is empty and I’m getting this error in the console:

userscript.html?name=Mystic%20Sorting.user.js&id=52e3a5a9-8179-4de6-96aa-75ce225191e3:211 Uncaught TypeError: Cannot read property 'getAttribute' of null
at sortAndReplace (userscript.html?name=Mystic%20Sorting.user.js&id=52e3a5a9-8179-4de6-96aa-75ce225191e3:211)
at MutationObserver.prepareTable (userscript.html?name=Mystic%20Sorting.user.js&id=52e3a5a9-8179-4de6-96aa-75ce225191e3:107)

You might want to add after line 210 checking, if the jumpButton variable is set.

Thanks for the report, I updated the script with a fix.

1 Like

The script was updated to fix the cell names, as well as tasks in the open logs section not being clickable (Thanks for the contribution, @st0ck53y :D)

2 Likes