mirror of
https://github.com/SoPat712/videospeed.git
synced 2026-04-24 21:42:53 -04:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
fad0c49e65
|
|||
|
66075fb6f3
|
|||
|
bf4025dcb4
|
|||
|
76a7b933bb
|
|||
|
1cd533fc5c
|
|||
|
8c5bd68d39
|
|||
|
9c257af446
|
|||
|
64a9b85587
|
|||
|
edd997037a
|
|||
|
f85a1f9f29
|
|||
|
97366b76b6
|
|||
|
8269875bb1
|
|||
|
e34ec17f33
|
|||
|
8d3905b654
|
|||
|
7fd8a931d8
|
|||
|
17319c1e25
|
|||
|
841c1a246e
|
|||
|
ed0f63e8bc
|
|||
|
53f66f1eeb
|
|||
|
f106ab490a
|
|||
|
5a38121e09
|
|||
|
36ed922b5c
|
|||
|
3275d1f322
|
|||
|
f6d706f096
|
|||
|
04292a8018
|
@@ -121,7 +121,7 @@ var controllerButtonDefs = {
|
||||
faster: { label: "", className: "" },
|
||||
advance: { label: "", className: "rw" },
|
||||
display: { label: "", className: "hideButton" },
|
||||
reset: { label: "\u21BB", className: "" },
|
||||
reset: { label: "", className: "" },
|
||||
fast: { label: "", className: "" },
|
||||
settings: { label: "", className: "" },
|
||||
pause: { label: "", className: "" },
|
||||
@@ -778,15 +778,6 @@ function setSubtitleNudgeEnabledForVideo(video, enabled) {
|
||||
|
||||
function subtitleNudgeIconMarkup(isEnabled) {
|
||||
var action = isEnabled ? "subtitleNudgeOn" : "subtitleNudgeOff";
|
||||
var custom =
|
||||
tc.settings.customButtonIcons &&
|
||||
tc.settings.customButtonIcons[action] &&
|
||||
tc.settings.customButtonIcons[action].svg;
|
||||
if (custom) {
|
||||
return (
|
||||
'<span class="vsc-btn-icon" aria-hidden="true">' + custom + "</span>"
|
||||
);
|
||||
}
|
||||
if (typeof vscIconSvgString !== "function") {
|
||||
return isEnabled ? "✓" : "×";
|
||||
}
|
||||
@@ -1376,7 +1367,6 @@ chrome.storage.sync.get(tc.settings, function (storage) {
|
||||
btn.textContent = (cdf2 && cdf2.label) || "?";
|
||||
}
|
||||
});
|
||||
updateSubtitleNudgeIndicator(video);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Speeder",
|
||||
"short_name": "Speeder",
|
||||
"version": "5.1.5",
|
||||
"version": "5.1.3",
|
||||
"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",
|
||||
|
||||
-45
@@ -545,51 +545,6 @@ label em {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.cb-icon.cb-icon-nudge-pair {
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
padding: 0 4px;
|
||||
gap: 4px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.cb-nudge-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cb-nudge-chip[data-nudge-state="on"] {
|
||||
background: #4b9135;
|
||||
border: 1px solid #6ec754;
|
||||
}
|
||||
|
||||
.cb-nudge-chip[data-nudge-state="off"] {
|
||||
background: #943e3e;
|
||||
border: 1px solid #c06060;
|
||||
}
|
||||
|
||||
.cb-nudge-chip .vsc-btn-icon svg,
|
||||
.cb-nudge-chip svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.cb-nudge-sep {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
opacity: 0.45;
|
||||
color: var(--text);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.row-lucide-pair select {
|
||||
justify-self: end;
|
||||
}
|
||||
|
||||
+3
-5
@@ -382,11 +382,9 @@
|
||||
rel="noopener noreferrer"
|
||||
>Lucide</a
|
||||
>
|
||||
set (fetched from jsDelivr). Custom icons are cached in local
|
||||
storage and included when you export settings. Subtitle nudge
|
||||
icons use two menu entries (enabled and disabled), not the bar
|
||||
block id
|
||||
<code>nudge</code>.
|
||||
set (fetched from jsDelivr). Chosen SVGs are cached in local
|
||||
storage and included in settings export.
|
||||
<strong>Reset speed</strong> stays numeric text only.
|
||||
</p>
|
||||
</div>
|
||||
<div class="row row-lucide-pair">
|
||||
|
||||
+2
-50
@@ -138,7 +138,7 @@ var controllerButtonDefs = {
|
||||
faster: { icon: "+", name: "Increase speed" },
|
||||
advance: { icon: "\u00BB", name: "Advance" },
|
||||
display: { icon: "\u00D7", name: "Close controller" },
|
||||
reset: { icon: "\u21BB", name: "Reset speed" },
|
||||
reset: { icon: "", name: "Reset speed" },
|
||||
fast: { icon: "\u2605", name: "Preferred speed" },
|
||||
nudge: { icon: "\u2713", name: "Subtitle nudge" },
|
||||
settings: { icon: "\u2699", name: "Settings" },
|
||||
@@ -149,12 +149,6 @@ var controllerButtonDefs = {
|
||||
};
|
||||
var popupExcludedButtonIds = new Set(["settings"]);
|
||||
|
||||
/** Lucide picker only — not control-bar blocks (chip uses subtitleNudgeOn/Off). */
|
||||
var lucideSubtitleNudgeActionLabels = {
|
||||
subtitleNudgeOn: "Subtitle nudge — enabled",
|
||||
subtitleNudgeOff: "Subtitle nudge — disabled"
|
||||
};
|
||||
|
||||
function sanitizePopupButtonOrder(buttonIds) {
|
||||
if (!Array.isArray(buttonIds)) return [];
|
||||
var seen = new Set();
|
||||
@@ -172,39 +166,6 @@ var customButtonIconsLive = {};
|
||||
|
||||
function fillControlBarIconElement(icon, buttonId) {
|
||||
if (!icon || !buttonId) return;
|
||||
if (buttonId === "nudge") {
|
||||
icon.innerHTML = "";
|
||||
icon.className = "cb-icon cb-icon-nudge-pair";
|
||||
function nudgeChipMarkup(action) {
|
||||
var c = customButtonIconsLive[action];
|
||||
if (c && c.svg) return c.svg;
|
||||
if (typeof vscIconSvgString === "function") {
|
||||
return vscIconSvgString(action, 14) || "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
function appendChip(action, stateKey) {
|
||||
var sp = document.createElement("span");
|
||||
sp.className = "cb-nudge-chip";
|
||||
sp.setAttribute("data-nudge-state", stateKey);
|
||||
var inner = nudgeChipMarkup(action);
|
||||
if (inner) {
|
||||
var wrap = document.createElement("span");
|
||||
wrap.className = "vsc-btn-icon";
|
||||
wrap.innerHTML = inner;
|
||||
sp.appendChild(wrap);
|
||||
}
|
||||
icon.appendChild(sp);
|
||||
}
|
||||
appendChip("subtitleNudgeOn", "on");
|
||||
var sep = document.createElement("span");
|
||||
sep.className = "cb-nudge-sep";
|
||||
sep.textContent = "/";
|
||||
icon.appendChild(sep);
|
||||
appendChip("subtitleNudgeOff", "off");
|
||||
return;
|
||||
}
|
||||
icon.className = "cb-icon";
|
||||
var custom = customButtonIconsLive[buttonId];
|
||||
if (custom && custom.svg) {
|
||||
icon.innerHTML = custom.svg;
|
||||
@@ -1396,16 +1357,7 @@ function initLucideButtonIconsUI() {
|
||||
actionSel.dataset.lucideInit = "1";
|
||||
actionSel.innerHTML = "";
|
||||
Object.keys(controllerButtonDefs).forEach(function (aid) {
|
||||
if (aid === "nudge") {
|
||||
Object.keys(lucideSubtitleNudgeActionLabels).forEach(function (subId) {
|
||||
var o2 = document.createElement("option");
|
||||
o2.value = subId;
|
||||
o2.textContent =
|
||||
lucideSubtitleNudgeActionLabels[subId] + " (" + subId + ")";
|
||||
actionSel.appendChild(o2);
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (aid === "reset") return;
|
||||
var o = document.createElement("option");
|
||||
o.value = aid;
|
||||
o.textContent =
|
||||
|
||||
@@ -8,7 +8,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
faster: { label: "", className: "" },
|
||||
advance: { label: "", className: "rw" },
|
||||
display: { label: "", className: "hideButton" },
|
||||
reset: { label: "\u21BB", className: "" },
|
||||
reset: { label: "", className: "" },
|
||||
fast: { label: "", className: "" },
|
||||
nudge: { label: "", className: "" },
|
||||
settings: { label: "", className: "" },
|
||||
|
||||
Reference in New Issue
Block a user