mirror of
https://github.com/SoPat712/videospeed.git
synced 2026-04-21 04:42:35 -04:00
refactor: Better explanations, feat: made show/hide controller shortcut optional
This commit is contained in:
@@ -343,6 +343,14 @@ label em {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.shortcut-label em {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
color: var(--muted);
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.customKey,
|
||||
.customValue {
|
||||
text-align: center;
|
||||
|
||||
+13
-3
@@ -96,7 +96,11 @@
|
||||
<section id="customs" class="settings-card">
|
||||
<div class="section-heading">
|
||||
<h3>Shortcuts</h3>
|
||||
<p class="section-intro">Backspace clears a shortcut. Escape disables it.</p>
|
||||
<p class="section-intro">
|
||||
Backspace clears a key. Escape disables optional shortcuts. If a site
|
||||
steals a shortcut, use a site rule with Override shortcuts (and
|
||||
per-key blocking) for that URL.
|
||||
</p>
|
||||
</div>
|
||||
<div class="shortcuts-grid">
|
||||
<div class="shortcut-row" id="display" data-action="display">
|
||||
@@ -132,7 +136,10 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="shortcut-row" id="slower" data-action="slower">
|
||||
<div class="shortcut-label">Decrease speed</div>
|
||||
<div class="shortcut-label">
|
||||
Decrease speed
|
||||
<em>Required: Speeder needs a key for this action.</em>
|
||||
</div>
|
||||
<input
|
||||
class="customKey"
|
||||
type="text"
|
||||
@@ -146,7 +153,10 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="shortcut-row" id="faster" data-action="faster">
|
||||
<div class="shortcut-label">Increase speed</div>
|
||||
<div class="shortcut-label">
|
||||
Increase speed
|
||||
<em>Required: Speeder needs a key for this action.</em>
|
||||
</div>
|
||||
<input
|
||||
class="customKey"
|
||||
type="text"
|
||||
|
||||
+1
-1
@@ -233,7 +233,7 @@ const actionLabels = {
|
||||
};
|
||||
|
||||
const speedBindingActions = ["slower", "faster", "fast", "softer", "louder"];
|
||||
const requiredShortcutActions = new Set(["display", "slower", "faster"]);
|
||||
const requiredShortcutActions = new Set(["slower", "faster"]);
|
||||
|
||||
function formatSpeedBindingDisplay(action, value) {
|
||||
if (!speedBindingActions.includes(action)) {
|
||||
|
||||
Reference in New Issue
Block a user