Timerhooker

Fixed, robust start/stop timer/video speed UI with 16x as default speed up. Blocks page visibility detection.

這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。

  • v4.2.0 2025-08-02

    Timerhooker Script Changelog

    Timerhooker Userscript Changelog

    From Version 4.1.2 (Original) to Version 4.2.0 (Updated)

    Summary of Changes

    • Removed duplicate function: Eliminated the repeated blockPageVisibilityDetection() function to avoid confusion and potential conflicts.
    • Replaced magic numbers with constants: Introduced well-named constants for all numeric literals (e.g., UI_SIZE, AUTOEDGE, DRAG_MARGIN) enhancing maintainability and readability.
    • Version updated to 4.2.0: Reflecting the refactor and improvements made.
    • Cleaned and consolidated code structure: Ensured all related constants and functions are grouped logically and consistently referenced.
    • Improved UI styling transitions: Used constants for transition durations in the CSS text for easier adjustments.
    • Added inline comments: Clarified purpose of constants and key functions for better future code understanding.
    • Confirmed cross-browser compatibility: Maintained universal compatibility and userscript manager independence.

    Impact for Users

    • Same user experience: The core functionality of toggling timer/video speeds and draggable UI remains unchanged.
    • Better stability and easier to maintain code base for future updates.
    • Reduced chance of bugs related to duplicate function definitions or hard-coded constants.
    • Lays foundation for easier feature enhancements or customization going forward.

    This changelog highlights the primary refactoring and structural improvements while preserving all original features and behavior.

  • v4.1.2 2025-07-20

    Change Log: Timerhooker v4.1.2

    What's New

    • Self-Contained Script: All timer and video speed logic is included in the script – no more @require dependencies or need for separate plugins.
    • Modern 16× Speed Toggle: Instantly switch all timers and videos between 1× (normal) and 16× (fast) speed with a single click/tap.
    • Minimal Glass UI: Redesigned round button with glass effect, drag-to-move, and play/stop icons. Fully adapts color to dark/light theme.
    • Auto Half-Hide: Button slides exactly 50% off nearest screen edge after 3 seconds UI idle; always at least half-visible and easy to reactivate.
    • Screen-Locked Placement: Button position is fixed to the viewport and never moves with page scroll. Always movable by drag, never lost or fully hidden.
    • Page Visibility Protection: Now blocks sites from tracking visibility/focus events for smoother operation and more privacy.
    • MutationObserver UI Recovery: Button automatically restores itself if removed, even by complex site scripts or dynamic page changes.

    Improvements

    • UI & Event Handling: All drag-and-move, click/tap, and idle logic is streamlined for robustness. Dock/undock logic and opacity tricks are replaced with a simpler, always-discoverable half-hide design.
    • Always Adaptive: The UI automatically matches browser/OS light or dark mode.
    • No Global API Exposure: Timer/video patching works internally, no leak of global APIs or config needed.

    Removed

    • External @require for plugin timer/video patching
    • Dock/undock state and multi-part UI logic
    • Complex global timer/context registration
    • Opacity and visibility fade effects ("vanishing" on idle)

    Summary Table

    Featurev4.1.1v4.1.2
    DependencyExternal (@require)None (standalone)
    Speed Options1× / 3×1× / 16×
    UI Hide StyleDock/undock, fadesSlides 50% off edge only
    Adaptive ThemePartialFull, OS/browser-driven
    Page Visibility ProtectionNoYes
    UI RecoveryNoMutationObserver auto-restore
  • v4.1.1 2025-07-12
  • v4.1.0 2025-04-08
  • v3.0.0 2025-04-03
  • v2.3.0 2025-04-03