Skip to content

Commit

Permalink
remove: hotkey
Browse files Browse the repository at this point in the history
  • Loading branch information
jebibot committed Jan 25, 2024
1 parent 57d2eee commit 0817fdc
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 30 deletions.
4 changes: 0 additions & 4 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
</div>
<div class="box">
<div class="question">플레이어</div>
<div class="row">
<label for="hotkey">단축키</label>
<input type="checkbox" id="hotkey" name="hotkey" />
</div>
<div class="row">
<label for="arrowSeek">방향키 탐색</label>
<input type="checkbox" id="arrowSeek" name="arrowSeek" />
Expand Down
1 change: 0 additions & 1 deletion popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ chrome.storage.local
updateSidebar: true,
category: true,
popupPlayer: true,
hotkey: true,
arrowSeek: true,
rememberTime: true,
fitPlayer: false,
Expand Down
25 changes: 1 addition & 24 deletions web/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ FPS: ${info.fps}
};

let pzpVue;
let viewModeButton;
const attachPlayerObserver = async (isLive, tries = 0) => {
const playerLayout = document.getElementById(
isLive ? "live_player_layout" : "player_layout"
Expand Down Expand Up @@ -610,7 +609,7 @@ const initPlayerFeatures = async (node, isLive, tries = 0) => {
);
}

viewModeButton = pzp.querySelector(".pzp-pc-viewmode-button");
const viewModeButton = pzp.querySelector(".pzp-pc-viewmode-button");
if (document.pictureInPictureEnabled) {
cloneButton(
viewModeButton,
Expand Down Expand Up @@ -931,28 +930,6 @@ document.body.addEventListener("keydown", (e) => {
return;
}
switch (e.key) {
case "f":
case "ㄹ":
if (config.hotkey && pzpVue != null) {
if (pzpVue.fullscreen) {
pzpVue.$store.dispatch("exitFullscreen");
} else {
pzpVue.$store.dispatch("requestFullscreen");
}
}
break;
case "m":
case "ㅡ":
if (config.hotkey && pzpVue != null) {
pzpVue.muted = !pzpVue.muted;
}
break;
case "t":
case "ㅅ":
if (config.hotkey) {
viewModeButton?.click();
}
break;
case "ArrowLeft":
seek(true);
break;
Expand Down
1 change: 0 additions & 1 deletion web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ if (
updateSidebar: true,
category: true,
popupPlayer: true,
hotkey: true,
arrowSeek: true,
rememberTime: true,
fitPlayer: false,
Expand Down

0 comments on commit 0817fdc

Please sign in to comment.