Skip to content

Commit 0c20c4b

Browse files
committed
New player shortcut
1 parent 76a9e94 commit 0c20c4b

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nebulaenhance",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Enhancer for Nebula. Adds some quality of life features to the nebula player.",
55
"main": "index.js",
66
"scripts": {

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "__MSG_title__",
44
"description": "__MSG_extensionDescription__",
5-
"version": "0.2.5",
5+
"version": "0.2.6",
66
"icons": {
77
"128": "icons/icon_128.png",
88
"64": "icons/icon_64.png"

src/scripts/pages/zype/zype.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ const getPressedKey = (playbackChange: number, e: KeyboardEvent) => {
145145
case 'l':
146146
action = () => window.theoplayer.currentTime += 10;
147147
break;
148+
case 'k':
149+
action = window.theoplayer.paused ? window.theoplayer.play : window.theoplayer.pause;
150+
break;
148151
case '0': case '1': case '2': case '3': case '4':
149152
case '5': case '6': case '7': case '8': case '9':
150153
window.theoplayer.currentTime = window.theoplayer.duration * (+pressedKey) / 10;

src/types/theoplayer.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ declare namespace THEOplayer {
1111
readonly social?: SocialSharing;
1212
readonly ui: v.Player;
1313
readonly upnext?: UpNextManager;
14+
paused: boolean;
15+
pause(): void;
16+
play(): void;
1417
}
1518
// only partially declared
1619
class ChromelessPlayer {

0 commit comments

Comments
 (0)