From ce0b28de4f57bc6d710fa55e24740748e4f5c848 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Tue, 7 Apr 2026 14:52:50 -0400 Subject: [PATCH 1/3] Update shortcut validation and stop tracking VS Code settings. Allow empty keybinds for optional shortcuts while requiring Show/Hide controller, Decrease speed, and Increase speed, and remove tracked .vscode files while keeping the folder gitignored. --- .vscode/settings.json | 3 --- options.js | 58 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 14 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 5480842..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "kiroAgent.configureMCP": "Disabled" -} \ No newline at end of file diff --git a/options.js b/options.js index b8e8dcf..ed4ed01 100644 --- a/options.js +++ b/options.js @@ -229,6 +229,7 @@ const actionLabels = { }; const speedBindingActions = ["slower", "faster", "fast"]; +const requiredShortcutActions = new Set(["display", "slower", "faster"]); function formatSpeedBindingDisplay(action, value) { if (!speedBindingActions.includes(action)) { @@ -607,9 +608,25 @@ function createKeyBindings(item) { var binding = normalizeStoredBinding(input.vscBinding); if (!binding) { + if (requiredShortcutActions.has(action)) { + return { + valid: false, + message: + "Error: Shortcut for " + + (actionLabels[action] || action) + + " cannot be empty. Unable to save" + }; + } + binding = createDisabledBinding(); + } + + if (binding.disabled === true && requiredShortcutActions.has(action)) { return { valid: false, - message: "Error: Shortcut for " + action + " is invalid. Unable to save" + message: + "Error: Shortcut for " + + (actionLabels[action] || action) + + " cannot be empty. Unable to save" }; } @@ -828,24 +845,43 @@ function save_options() { if (ruleEl.querySelector(".override-shortcuts").checked) { var shortcuts = []; ruleEl.querySelectorAll(".site-shortcuts-container .customs").forEach((shortcutRow) => { + if (saveError) return; var action = shortcutRow.dataset.action; var keyInput = shortcutRow.querySelector(".customKey"); var valueInput = shortcutRow.querySelector(".customValue"); var forceCheckbox = shortcutRow.querySelector(".customForce"); var binding = normalizeStoredBinding(keyInput.vscBinding); - if (binding) { - shortcuts.push({ - action: action, - code: binding.code, - disabled: binding.disabled === true, - value: customActionsNoValues.includes(action) - ? 0 - : Number(valueInput.value), - force: forceCheckbox ? forceCheckbox.checked : false - }); + if (!binding) { + if (requiredShortcutActions.has(action)) { + saveError = + "Error: Site rule shortcut for " + + (actionLabels[action] || action) + + " cannot be empty. Unable to save"; + return; + } + binding = createDisabledBinding(); } + + if (binding.disabled === true && requiredShortcutActions.has(action)) { + saveError = + "Error: Site rule shortcut for " + + (actionLabels[action] || action) + + " cannot be empty. Unable to save"; + return; + } + + shortcuts.push({ + action: action, + code: binding.code, + disabled: binding.disabled === true, + value: customActionsNoValues.includes(action) + ? 0 + : Number(valueInput.value), + force: forceCheckbox ? forceCheckbox.checked : false + }); }); + if (saveError) return; if (shortcuts.length > 0) rule.shortcuts = shortcuts; } From 7713ba5bad9a7e4b67a89155fc3146d9e6cc11f6 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Tue, 7 Apr 2026 14:53:49 -0400 Subject: [PATCH 2/3] Fix Firefox extension link in README Updated Firefox extension link in README.md. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2a96866..a0559aa 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ last point to listen to it a few more times. ![Player](https://cloud.githubusercontent.com/assets/2400185/24076745/5723e6ae-0c41-11e7-820c-1d8e814a2888.png) -#### *Install [Chrome](https://chrome.google.com/webstore/detail/video-speed-controller/nffaoalbilbmmfgbnbgppjihopabppdk) or [Firefox](https://addons.mozilla.org/en-us/firefox/addon/videospeed/) Extension* +#### *Install [Chrome](https://chrome.google.com/webstore/detail/video-speed-controller/nffaoalbilbmmfgbnbgppjihopabppdk) or [Firefox](https://addons.mozilla.org/en-us/firefox/addon/speeder/) Extension* \*\* Once the extension is installed simply navigate to any page that offers HTML5 video ([example](https://www.youtube.com/watch?v=E9FxNzv1Tr8)), and you'll @@ -56,7 +56,7 @@ shortcuts with different values, which will allow you to quickly toggle between your most commonly used speeds. To add a new shortcut, open extension settings and click "Add New". -![settings Add New shortcut](https://user-images.githubusercontent.com/121805/50726471-50242200-1172-11e9-902f-0e5958387617.jpg) +image Some sites may assign other functionality to one of the assigned shortcut keys — these collisions are inevitable, unfortunately. As a workaround, the extension From 5d47c511be2bd3caa327651ea0aa3348c136a0b9 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Tue, 7 Apr 2026 14:54:33 -0400 Subject: [PATCH 3/3] Bump version to 5.1.9.0 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 8a8ee70..58faa88 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Speeder", "short_name": "Speeder", - "version": "5.1.8.0", + "version": "5.1.9.0", "manifest_version": 2, "description": "Speed up, slow down, advance and rewind HTML5 audio/video with shortcuts (New and improved version of \"Video Speed Controller\")", "homepage_url": "https://github.com/SoPat712/speeder",