Skip to content

Commit

Permalink
remove Ctrl+Shift+Space quality setting shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
GooseOb committed May 25, 2024
1 parent c25bd57 commit 1353fa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
22 changes: 7 additions & 15 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ document.addEventListener(
'keyup',
(e) => {
if (e.code === 'Enter') return onClick(e);
if (!e.ctrlKey) return;
if (!e.ctrlKey || e.shiftKey) return;
if (cfg.flags.copySubs && e.code === 'KeyC') {
const plr = document.querySelector('.html5-video-player');
if (!plr?.classList.contains('ytp-fullscreen')) return;
Expand All @@ -797,21 +797,13 @@ document.addEventListener(
if (e.code !== 'Space') return;
e.stopPropagation();
e.preventDefault();
let setting: YTSetting;
if (e.shiftKey) {
setting = QUALITY;
} else {
const value = channelConfig.current
? channelConfig.current.customSpeed ||
(!channelConfig.current.speed && cfg.global.customSpeed)
: cfg.global.customSpeed;
if (value) return valueSetters.customSpeed(value);
setting = SPEED;
}
const customSpeedValue = channelConfig.current
? channelConfig.current.customSpeed ||
(!channelConfig.current.speed && cfg.global.customSpeed)
: cfg.global.customSpeed;
if (customSpeedValue) return valueSetters.customSpeed(customSpeedValue);
restoreFocusAfter(() => {
valueSetters[setting](
(channelConfig.current || cfg.global)[setting] as never
);
valueSetters[SPEED]((channelConfig.current || cfg.global)[SPEED]);
});
},
{ capture: true }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yt-defaulter",
"author": "GooseOb",
"version": "1.9.4",
"version": "1.10.0",
"repository": {
"type": "git",
"url": "git+https://github.com/GooseOb/YT-Defaulter.git"
Expand Down

0 comments on commit 1353fa5

Please sign in to comment.