Commit 3e5ab949 authored by Jonas Haraldsson's avatar Jonas Haraldsson

clickable artistname for logged in users

clicking on artistname tunes to artist station
parent 15286b24
......@@ -100,11 +100,21 @@ function playerReady() {
$("#player > #interface").show();
$("#tags").placeholdr({placeholderText: example_tags});
$("#volume-slider").slider({range: "min", min: 0, max: 100, value: 60, slide: setVolume});
$('#tracktags ul').on('click', 'li', function(event) {
var tagname = event.target.textContent;
var tagstation = 'librefm://globaltags/' + tagname;
tune(tagstation);
});
// If logged in, enable tune buttons
if(ws_key) {
$('#artistname').css({'background' : '#ccc', 'border-radius' : '2px', 'padding' : '0px 2px'});
$('#artistname').on('click', function(event) {
var artistname = event.target.textContent;
var artiststation = 'librefm://artist/' + artistname;
tune(artiststation);
});
$('#tracktags ul').on('click', 'li', function(event) {
var tagname = event.target.textContent;
var tagstation = 'librefm://globaltags/' + tagname;
tune(tagstation);
});
}
loadVolume();
player_ready = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment