From b809e7aaa318c86a6c7a5653ac4c5c9d87dc4396 Mon Sep 17 00:00:00 2001 From: Andre Ferreira Date: Tue, 4 Apr 2017 23:28:38 +0100 Subject: [PATCH 1/2] Fixing Spotify compatibility --- code/js/controllers/SpotifyController.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/js/controllers/SpotifyController.js b/code/js/controllers/SpotifyController.js index d8d2b985..50f07db4 100644 --- a/code/js/controllers/SpotifyController.js +++ b/code/js/controllers/SpotifyController.js @@ -5,12 +5,12 @@ _ = require("lodash"); var multiSelectors = { - play: [null, ".now-playing-bar .spoticon-play-32"], - pause: [null, ".now-playing-bar .spoticon-pause-32"], + play: [null, ".now-playing-bar button[title=Play]"], + pause: [null, ".now-playing-bar button[title=Pause]"], playPause: ["#play-pause", null], - playNext: ["#next", ".now-playing-bar .spoticon-skip-forward-24"], - playPrev: ["#previous", ".now-playing-bar .spoticon-skip-back-24"], - playState: ["#play-pause.playing", ".now-playing-bar .spoticon-pause-32"], + playNext: ["#next", ".now-playing-bar button[title=Next]"], + playPrev: ["#previous", ".now-playing-bar button[title=Previous]"], + playState: ["#play-pause.playing", ".now-playing-bar button[title=Pause]"], iframe: ["#app-player", null], like: [".thumb.up", null], dislike: [".thumb.down", null], From a319b9a0e2c3e099cfee36a85602040534fe11ea Mon Sep 17 00:00:00 2001 From: Andre Ferreira Date: Tue, 4 Apr 2017 23:53:49 +0100 Subject: [PATCH 2/2] alternative selectors so it works for all languages --- code/js/controllers/SpotifyController.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/js/controllers/SpotifyController.js b/code/js/controllers/SpotifyController.js index 50f07db4..78592606 100644 --- a/code/js/controllers/SpotifyController.js +++ b/code/js/controllers/SpotifyController.js @@ -5,12 +5,12 @@ _ = require("lodash"); var multiSelectors = { - play: [null, ".now-playing-bar button[title=Play]"], - pause: [null, ".now-playing-bar button[title=Pause]"], + play: [null, ".now-playing-bar button[class*=play]"], + pause: [null, ".now-playing-bar button[class*=pause]"], playPause: ["#play-pause", null], - playNext: ["#next", ".now-playing-bar button[title=Next]"], - playPrev: ["#previous", ".now-playing-bar button[title=Previous]"], - playState: ["#play-pause.playing", ".now-playing-bar button[title=Pause]"], + playNext: ["#next", ".now-playing-bar button[class*=skip-forward]"], + playPrev: ["#previous", ".now-playing-bar button[class*=skip-back]"], + playState: ["#play-pause.playing", ".now-playing-bar button[class*=pause]"], iframe: ["#app-player", null], like: [".thumb.up", null], dislike: [".thumb.down", null],