mirror of
https://github.com/SoPat712/videospeed.git
synced 2026-04-27 06:32:52 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
ab7ae99807
|
|||
|
5d47c511be
|
|||
| 7713ba5bad | |||
|
ce0b28de4f
|
Vendored
-3
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"kiroAgent.configureMCP": "Disabled"
|
|
||||||
}
|
|
||||||
@@ -33,7 +33,7 @@ last point to listen to it a few more times.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### *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
|
\*\* 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
|
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
|
your most commonly used speeds. To add a new shortcut, open extension settings
|
||||||
and click "Add New".
|
and click "Add New".
|
||||||
|
|
||||||

|
<img width="1760" height="1330" alt="image" src="https://github.com/user-attachments/assets/32e814dd-93ea-4943-8ec9-3eca735447ac" />
|
||||||
|
|
||||||
Some sites may assign other functionality to one of the assigned shortcut keys —
|
Some sites may assign other functionality to one of the assigned shortcut keys —
|
||||||
these collisions are inevitable, unfortunately. As a workaround, the extension
|
these collisions are inevitable, unfortunately. As a workaround, the extension
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Speeder",
|
"name": "Speeder",
|
||||||
"short_name": "Speeder",
|
"short_name": "Speeder",
|
||||||
"version": "5.1.8.0",
|
"version": "5.1.9.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"description": "Speed up, slow down, advance and rewind HTML5 audio/video with shortcuts (New and improved version of \"Video Speed Controller\")",
|
"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",
|
"homepage_url": "https://github.com/SoPat712/speeder",
|
||||||
|
|||||||
+39
-3
@@ -229,6 +229,7 @@ const actionLabels = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const speedBindingActions = ["slower", "faster", "fast"];
|
const speedBindingActions = ["slower", "faster", "fast"];
|
||||||
|
const requiredShortcutActions = new Set(["display", "slower", "faster"]);
|
||||||
|
|
||||||
function formatSpeedBindingDisplay(action, value) {
|
function formatSpeedBindingDisplay(action, value) {
|
||||||
if (!speedBindingActions.includes(action)) {
|
if (!speedBindingActions.includes(action)) {
|
||||||
@@ -607,9 +608,25 @@ function createKeyBindings(item) {
|
|||||||
var binding = normalizeStoredBinding(input.vscBinding);
|
var binding = normalizeStoredBinding(input.vscBinding);
|
||||||
|
|
||||||
if (!binding) {
|
if (!binding) {
|
||||||
|
if (requiredShortcutActions.has(action)) {
|
||||||
return {
|
return {
|
||||||
valid: false,
|
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"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
binding = createDisabledBinding();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (binding.disabled === true && requiredShortcutActions.has(action)) {
|
||||||
|
return {
|
||||||
|
valid: false,
|
||||||
|
message:
|
||||||
|
"Error: Shortcut for " +
|
||||||
|
(actionLabels[action] || action) +
|
||||||
|
" cannot be empty. Unable to save"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,13 +845,32 @@ function save_options() {
|
|||||||
if (ruleEl.querySelector(".override-shortcuts").checked) {
|
if (ruleEl.querySelector(".override-shortcuts").checked) {
|
||||||
var shortcuts = [];
|
var shortcuts = [];
|
||||||
ruleEl.querySelectorAll(".site-shortcuts-container .customs").forEach((shortcutRow) => {
|
ruleEl.querySelectorAll(".site-shortcuts-container .customs").forEach((shortcutRow) => {
|
||||||
|
if (saveError) return;
|
||||||
var action = shortcutRow.dataset.action;
|
var action = shortcutRow.dataset.action;
|
||||||
var keyInput = shortcutRow.querySelector(".customKey");
|
var keyInput = shortcutRow.querySelector(".customKey");
|
||||||
var valueInput = shortcutRow.querySelector(".customValue");
|
var valueInput = shortcutRow.querySelector(".customValue");
|
||||||
var forceCheckbox = shortcutRow.querySelector(".customForce");
|
var forceCheckbox = shortcutRow.querySelector(".customForce");
|
||||||
var binding = normalizeStoredBinding(keyInput.vscBinding);
|
var binding = normalizeStoredBinding(keyInput.vscBinding);
|
||||||
|
|
||||||
if (binding) {
|
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({
|
shortcuts.push({
|
||||||
action: action,
|
action: action,
|
||||||
code: binding.code,
|
code: binding.code,
|
||||||
@@ -844,8 +880,8 @@ function save_options() {
|
|||||||
: Number(valueInput.value),
|
: Number(valueInput.value),
|
||||||
force: forceCheckbox ? forceCheckbox.checked : false
|
force: forceCheckbox ? forceCheckbox.checked : false
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
if (saveError) return;
|
||||||
if (shortcuts.length > 0) rule.shortcuts = shortcuts;
|
if (shortcuts.length > 0) rule.shortcuts = shortcuts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user