WTR-Lab Library Auto-Sorter by Progress

Automatically loads all items and sorts your WTR-Lab library by reading progress. Sort order and logging are configurable in the menu.

这些是此脚本的所有版本。 只显示代码变更过的版本。

  • v2.6 2025-10-28

    Changelog

    • 🚀 v2.6: Added a new "Toggle Logging" option to the Tampermonkey menu, allowing you to enable or disable console messages for easier troubleshooting. Logging is now disabled by default.
    • 🐛 v2.5: Fixed a bug that could cause library items to be duplicated after sorting. The script is now more precise in identifying and processing the correct content.
    • v2.4: Made the script reactive to in-page navigation. It now automatically re-runs the sorting process when you switch between different library folders without requiring a manual page refresh.
  • v2.2 2025-10-18

    Changelog

    v2.2

    • 🐛 MAJOR BUG FIX: Fixed a critical race condition where the script would run before the website had loaded any library items. This caused both the "Load More" and sorting features to fail.
    • 🔧 Refactor: Re-implemented the MutationObserver from v1.5. The script now correctly waits for the initial content to appear before executing the main logic, making it much more reliable.

    v2.1

    • 🐛 Bug Fix: Resolved a SyntaxError that was breaking the script for some users. The error was caused by complex syntax in the menu registration function.
    • 🔧 Refactor: Simplified the code for generating the Tampermonkey menu commands to ensure maximum browser compatibility.
    • 📝 Misc: Enabled debug logging by default to make future troubleshooting easier.

    v2.0

    • ✨ NEW FEATURE: Automatic "Load More": The script now automatically detects and clicks the "Load More" button until all library items are displayed on the page. Sorting now applies to your entire library at once.
    • ✨ NEW FEATURE: Configurable Sort Order: Added a menu in Tampermonkey allowing users to choose between Ascending (default) and Descending sort order.
    • 🔧 Refactor: Switched from localStorage to the more robust GM_setValue and GM_getValue for saving user settings. This is the standard and recommended way for userscripts.

    v1.5

    • Initial Public Release:
      • Automatically sorts the initially visible library items by reading progress (lowest to highest).
      • Uses a MutationObserver to wait for items to be loaded by the website's JavaScript before sorting.
  • v1.5 2025-10-10