mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 12:21:47 +00:00
Added like and dislike buttons
This commit is contained in:
@ -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';
|
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
|
// 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) => {
|
const presskey = (window, key) => {
|
||||||
window.webContents.sendInputEvent({
|
window.webContents.sendInputEvent({
|
||||||
@ -58,13 +58,19 @@ module.exports = win => {
|
|||||||
mode: 'buttons',
|
mode: 'buttons',
|
||||||
segments: [
|
segments: [
|
||||||
new TouchBarButton({
|
new TouchBarButton({
|
||||||
label: '<'
|
label: '⏮'
|
||||||
}),
|
}),
|
||||||
new TouchBarButton({
|
new TouchBarButton({
|
||||||
label: '⏯️'
|
label: '⏯️'
|
||||||
}),
|
}),
|
||||||
new TouchBarButton({
|
new TouchBarButton({
|
||||||
label: '>'
|
label: '⏭'
|
||||||
|
}),
|
||||||
|
new TouchBarButton({
|
||||||
|
label: '👍'
|
||||||
|
}),
|
||||||
|
new TouchBarButton({
|
||||||
|
label: '👎'
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
change: i => presskey(win, keys[i])
|
change: i => presskey(win, keys[i])
|
||||||
|
|||||||
Reference in New Issue
Block a user