v6.0.4-beta.1

This commit is contained in:
2026-07-26 11:15:22 -04:00
10 changed files with 38 additions and 22 deletions
+2 -2
View File
@@ -159,8 +159,8 @@ var tc = {
lastInteractedMedia: null
};
var MIN_SPEED = Number(keyBindingUtils.MIN_SPEED) || 0.01;
var MAX_SPEED = Number(keyBindingUtils.MAX_SPEED) || 100;
var MIN_SPEED = Number(keyBindingUtils.MIN_SPEED) || 0.1;
var MAX_SPEED = Number(keyBindingUtils.MAX_SPEED) || 16;
var YT_NATIVE_MIN = 0.25;
var YT_NATIVE_MAX = 2.0;
var YT_NATIVE_STEP = 0.05;
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "Speeder",
"short_name": "Speeder",
"version": "6.0.3",
"version": "6.0.4",
"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",
+15 -5
View File
@@ -322,7 +322,7 @@ label em {
.shortcut-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 120px 120px;
grid-template-columns: minmax(0, 1fr) 120px 120px 38px;
gap: 12px;
align-items: center;
padding: 10px 0;
@@ -334,10 +334,6 @@ label em {
border-top: 0;
}
.shortcut-row.customs {
grid-template-columns: minmax(0, 1fr) 120px 120px 38px;
}
.shortcut-label {
color: var(--text);
font-weight: 500;
@@ -1061,6 +1057,20 @@ button.lucide-result-tile.lucide-picked {
font-weight: 500;
}
#status:not(:empty) {
position: fixed;
right: 20px;
bottom: 20px;
z-index: 1000;
min-height: 0;
margin: 0;
padding: 10px 14px;
border: 1px solid var(--border-strong);
border-radius: 999px;
background: var(--panel);
box-shadow: 0 8px 24px rgba(17, 24, 39, 0.16);
}
#status:empty {
display: none;
}
+1 -1
View File
@@ -843,7 +843,7 @@
</div>
<div class="site-rule-option site-rule-option-field">
<label
>Preferred speed (0.01&ndash;100):<br /><em
>Preferred speed (0.1&ndash;16):<br /><em
>Overrides the Preferred speed action for matching
URLs. It does not force every video to start at this
speed.</em
+6 -4
View File
@@ -165,6 +165,7 @@ function createDefaultBinding(action, code, value) {
var tcDefaults = vscGetSettingsDefaults();
var optionsSyncSettingsLoaded = false;
var autoSaveTimer = null;
var saveStatusTimer = null;
function scheduleAutoSave() {
if (!optionsSyncSettingsLoaded) return;
@@ -179,7 +180,7 @@ function scheduleAutoSave() {
return;
}
autoSaveTimer = null;
save_options();
save_options(true);
}, 300);
autoSaveTimer = scheduledTimer;
}
@@ -807,8 +808,9 @@ function validate() {
return valid;
}
function save_options() {
function save_options(isAutoSave) {
clearTimeout(autoSaveTimer);
clearTimeout(saveStatusTimer);
autoSaveTimer = null;
var status = document.getElementById("status");
if (!optionsSyncSettingsLoaded) {
@@ -1121,8 +1123,8 @@ function save_options() {
status.textContent = "Error: Unable to save options - " + error.message;
return;
}
status.textContent = "Options saved";
setTimeout(function () {
status.textContent = isAutoSave === true ? "Auto-saved" : "Options saved";
saveStatusTimer = setTimeout(function () {
status.textContent = "";
}, 1000);
});
+2 -2
View File
@@ -8,8 +8,8 @@
root.SpeederShared = root.SpeederShared || {};
root.SpeederShared.keyBindings = exports;
})(typeof globalThis !== "undefined" ? globalThis : this, function() {
var MIN_SPEED = 0.01;
var MAX_SPEED = 100;
var MIN_SPEED = 0.1;
var MAX_SPEED = 16;
function normalizeBindingKey(key) {
if (typeof key !== "string" || key.length === 0) return null;
+2 -2
View File
@@ -4,8 +4,8 @@
var LEGACY_SITE_RULES_DIFF_FORMAT = "defaults-diff-v1";
var SITE_RULES_DIFF_FORMAT = "defaults-diff-v2";
var REMOVED_DEFAULT_RULE_KEYS_META = "removedDefaultRuleKeys";
var MIN_SPEED = 0.01;
var MAX_SPEED = 100;
var MIN_SPEED = 0.1;
var MAX_SPEED = 16;
var DEFAULT_BUTTONS = ["rewind", "slower", "faster", "advance", "display"];
var LEGACY_SYNC_KEYS = [
"resetSpeed",
+1
View File
@@ -81,6 +81,7 @@ describe("options.js", () => {
await vi.advanceTimersByTimeAsync(300);
expect(chrome.storage.sync._dump().rememberSpeed).toBe(true);
expect(document.getElementById("status").textContent).toBe("Auto-saved");
});
it("does not partially save options when a required site shortcut is invalid", async () => {
+1 -1
View File
@@ -257,7 +257,7 @@ describe("canonical settings storage", () => {
expect(rule.forceLastSavedSpeed).toBe(true);
expect(rule.controllerOpacity).toBe(1);
expect(rule.subtitleNudgeInterval).toBe(250);
expect(rule.preferredSpeed).toBe(100);
expect(rule.preferredSpeed).toBe(16);
});
it("falls back for null and blank numeric settings instead of coercing zero", () => {
+7 -4
View File
@@ -158,10 +158,13 @@ describe("shared helpers", () => {
"NumpadAdd"
);
expect(keyBindingUtils.getLegacyKeyCode({ key: 65 })).toBe(65);
expect(keyBindingUtils.getActionValueError("fast", 0.01)).toBeNull();
expect(keyBindingUtils.getActionValueError("fast", 100)).toBeNull();
expect(keyBindingUtils.getActionValueError("fast", 0.009)).toContain(
"between 0.01 and 100"
expect(keyBindingUtils.getActionValueError("fast", 0.1)).toBeNull();
expect(keyBindingUtils.getActionValueError("fast", 16)).toBeNull();
expect(keyBindingUtils.getActionValueError("fast", 0.099)).toContain(
"between 0.1 and 16"
);
expect(keyBindingUtils.getActionValueError("fast", 16.001)).toContain(
"between 0.1 and 16"
);
});