msfeldstein / chrome-media-keys

Chrome extension that adds media keys to most web music players
GNU Affero General Public License v3.0
89 stars 33 forks source link

Fixes for `open.spotify.com` #115

Closed dan-lee closed 7 years ago

dan-lee commented 7 years ago

This PR includes following 2 fixes:

  1. Contrary to playlists, on album pages the selector .now-playing-bar [href^="/album"] for the title would return two results: 1. The album art (picture) and 2. the title text. On playlist pages the first result is the title text. To fix this, all elements with this selector are selected (with document.querySelectorAll) and the last result is taken as title text.
  2. With the new Spotify version there can be more than one artist per track. These are now concatenated with a comma separated list

Before & after:

cmk_before cmk_after

(Example album)

msfeldstein commented 7 years ago

Thanks for handling all this