Skip to content

Commit

Permalink
feat: Add support for youtube music (#61)
Browse files Browse the repository at this point in the history
* support for youtube music

* support for youtube music - fix tabQuery

Co-Authored-By: shakhraj <[email protected]>
  • Loading branch information
shakhraj authored and GabeDuarteM committed Dec 24, 2018
1 parent 89dd88e commit 3ea6a5b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ This extension allows you to configure shortcuts to `play`, `pause` and go to th

To configure the shortcuts, go to `chrome://extensions/shortcuts` (you have to copy and paste it on the address bar), find the `Webplayer Hotkeys` extension and assign the shortcuts to the commands you want

If there is more player tabs than one, it follows this order of priority: `Spotify > Deezer > SoundCloud > Youtube`
If there is more player tabs than one, it follows this order of priority: `Spotify > Deezer > SoundCloud > Youtube Music > Youtube`

Works with:

- Spotify
- Deezer
- SoundCloud
- Youtube
- Youtube Music

## LICENSE

Expand Down
11 changes: 11 additions & 0 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ const players: Player[] = [
title: 'soundcloud',
url: 'https://soundcloud.com/',
},
{
controlQueries: {
next: '.next-button.ytmusic-player-bar',
play: '.play-pause-button.ytmusic-player-bar',
prev: '.previous-button.ytmusic-player-bar',
},
default: false,
tabQuery: '*://music.youtube.com/*',
title: 'youtubemusic',
url: 'https://music.youtube.com/',
},
{
controlQueries: {
next: '.ytp-next-button.ytp-button',
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Webplayer Hotkeys - Shortcuts for web players",
"version": "0.0.0",
"description":
"Assign hotkeys to play/pause, and switch music. Works with Spotify, Deezer, SoundCloud and Youtube.",
"Assign hotkeys to play/pause, and switch music. Works with Spotify, Deezer, SoundCloud, Youtube and Youtube Music.",
"icons": {
"128": "icon.png"
},
Expand Down

0 comments on commit 3ea6a5b

Please sign in to comment.