Skip to content

Commit

Permalink
Support Deezer's new interface
Browse files Browse the repository at this point in the history
This query supports the new Deezer interface in beta (which is miles better), and is backward-compatible with the current interface at the same time.

The change is they removed the `.control-*` class from all control buttons for some reason, so all of them have the same set of classes now. That's why I opted for using `aria-label` in queries.

The class `.player-controls` at the beginning can be ommitted (tested in both interfaces, each query still returns the same single element), but I thought it's safer to keep it.
  • Loading branch information
HazemAM committed Jul 15, 2018
1 parent 8da6f0e commit b499827
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extension/keysocket-deezer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
keySocket.init(
"deezer",
{
"play-pause": ".control-play, .control-pause",
"prev": ".control-prev",
"next": ".control-next"
"play-pause": ".player-controls button[aria-label='Play'], .player-controls button[aria-label='Pause']",
"prev": ".player-controls button[aria-label='Back']",
"next": ".player-controls button[aria-label='Next']"
// stop is omitted
}
);

0 comments on commit b499827

Please sign in to comment.