Skip to content

Commit

Permalink
Fix love button in queue view
Browse files Browse the repository at this point in the history
  • Loading branch information
jiri-janousek committed Sep 25, 2020
1 parent e15b986 commit 5580fff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Deezer Changelog
* Fix track title and artist in queue view. Issue: tiliado/nuvolaruntime#609
* Disable broken volume management.
* Fix repeat button.
* Fix love button in queue view.

3.2 - February 24th, 2019
-------------------------
Expand Down
12 changes: 7 additions & 5 deletions integrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@
}

WebApp._getLoveButton = function () {
var buttons = document.querySelectorAll('.player-bottom .track-actions button') // new Deezer 2018
var button = (document.querySelector('.player .player-actions .svg-icon-love-outline') ||
document.querySelector('.player .player-actions .icon-love') || (buttons[2] ? buttons[2].firstChild : null))
var buttons = document.querySelectorAll('.player-bottom .track-actions button')
var fullPlayerButtons = document.querySelectorAll('.player-full .queuelist-cover-actions button')
var button = (
(fullPlayerButtons.length >= 3 ? fullPlayerButtons[2] : null) ||
(buttons.length >= 3 ? buttons[2] : null)
)
var state = false
if (button) {
state = button.classList.contains('is-active') || button.classList.contains('active')
button = button.parentNode
state = button.firstChild.classList.contains('is-active')
}
return { button: button, state: state }
}
Expand Down

0 comments on commit 5580fff

Please sign in to comment.