From d99aa0242fbcfc24a9b413f7043030451c2c6595 Mon Sep 17 00:00:00 2001 From: Sem Vissscher Date: Wed, 16 Dec 2020 19:54:44 +0100 Subject: [PATCH] Added like and dislike buttons --- plugins/touchbar/back.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/touchbar/back.js b/plugins/touchbar/back.js index f4c156ef..21c8201a 100644 --- a/plugins/touchbar/back.js +++ b/plugins/touchbar/back.js @@ -17,7 +17,7 @@ const titleSelector = '.title.style-scope.ytmusic-player-bar'; const imageSelector = '#layout > ytmusic-player-bar > div.middle-controls.style-scope.ytmusic-player-bar > img'; // These keys will be used to go backwards, pause and skip songs -const keys = ['k', 'space', 'j']; +const keys = ['k', 'space', 'j', '+', '_']; const presskey = (window, key) => { window.webContents.sendInputEvent({ @@ -58,13 +58,19 @@ module.exports = win => { mode: 'buttons', segments: [ new TouchBarButton({ - label: '<' + label: '⏮' }), new TouchBarButton({ label: '⏯️' }), new TouchBarButton({ - label: '>' + label: '⏭' + }), + new TouchBarButton({ + label: '👍' + }), + new TouchBarButton({ + label: '👎' }) ], change: i => presskey(win, keys[i])