From b499827f7805cac6a3c8b344b6d3216ee2c62bae Mon Sep 17 00:00:00 2001 From: Hazem AbuMostafa Date: Sun, 15 Jul 2018 19:24:40 +0200 Subject: [PATCH] Support Deezer's new interface 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. --- extension/keysocket-deezer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/keysocket-deezer.js b/extension/keysocket-deezer.js index d7aa32b..93b8286 100644 --- a/extension/keysocket-deezer.js +++ b/extension/keysocket-deezer.js @@ -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 } ); \ No newline at end of file