Zoom Shortcuts

Adds configurable shortcuts for all zoom levels

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

  • v2025.09.04 2025-09-15

    Migrate Zoom Shortcuts to WME SDK and convert old settings

    • Switched shortcut registration to new SDK
    • Legacy user settings are migrated to the SDK format

    Auto-resolve duplicate shortcut key conflicts

    Catch SDK registration errors for duplicate key combinations, automatically

    Reset conflicting shortcuts to null, and retry registration. Prevents script Failure and ensures all zoom shortcuts are registered successfully.

    feat: Add defensive coding for WME SDK shortcut format inconsistency

    PROBLEM: The WME SDK returns shortcut keys in inconsistent formats depending on timing:

    • Initial page load: combo format ("0", "A+X", "CS+K")
    • After user changes shortcuts: raw format ("0,48", "4,65", "3,75")
    • After page reload: back to combo format again

    This caused our localStorage to contain mixed/invalid data like: { "zoom10": {"raw": "0", "combo": "0"}, // Should be "0,48" "zoom11": {"raw": "1", "combo": "1"}, // Should be "0,49" "zoom20": {"raw": "4,48", "combo": "A+0"} // This one was correct }

    SOLUTION: Added comprehensive defensive coding to handle SDK inconsistency:

    1. Enhanced comboToRawKeycodes():

      • Now handles single chars ("0" → "0,48")
      • Preserves already-raw format ("0,48" → "0,48")
      • Converts combo format ("A+0" → "4,48")
    2. Improved shortcutKeycodesToCombo():

      • Handles both raw and combo inputs reliably
      • Always returns consistent human-readable format
    3. Updated loadSettingsFromStorage():

      • Validates and normalizes existing stored data
      • Fixes inconsistent raw/combo pairs from previous runs
      • Regenerates missing raw or combo values
      • Prevents future corruption
    4. Enhanced saveSettings():

      • Added logging to track what format SDK returns
      • Normalizes SDK output before storage
      • Ensures consistent storage format regardless of SDK behavior
    5. Strengthened legacy migration:

      • Handles more legacy format variations
      • Better type checking and error handling
      • More detailed logging for troubleshooting

    IMPACT:

    • Eliminates storage corruption from SDK format inconsistency
    • Provides reliable round-trip storage/retrieval of shortcuts
    • Self-heals existing corrupted data on next load
    • Maintains backward compatibility with legacy settings
    • Extensive logging for debugging future issues

    TESTING: After these changes, localStorage consistently shows proper format: { "zoom10": {"raw": "0,48", "combo": "0"}, "zoom11": {"raw": "0,49", "combo": "1"} }

    This defensive approach ensures the script works reliably regardless of when/how the SDK decides to change its return format behavior.

    Merge pull request #1 from JS55CT/master

    Master

  • v2022.08.17.01 2022-08-17 Update ZoomShortcuts.js
  • v2022.08.17.01 2022-08-17 Update ZoomShortcuts.js
  • v2021.08.17.01 2022-08-17 Update ZoomShortcuts.js
  • v2021.08.17.01 2022-08-17 Update ZoomShortcuts.js
  • v2021.08.26.01 2021-08-26
  • v2020.03.25.01 2020-03-25 Update ZoomShortcuts.js
  • v2020.03.25.01 2020-03-25 Update ZoomShortcuts.js
  • v2019.11.26.01 2019-11-26 Update ZoomShortcuts.js
  • v2019.11.26.01 2019-11-26 Update ZoomShortcuts.js
  • v2019.04.22.01 2019-04-22 Update ZoomShortcuts.js
  • v2019.04.22.01 2019-04-22 Update ZoomShortcuts.js
  • v0.1 2019-04-22 Imported from URL
  • v0.1 2019-04-22

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址