2.3.5 last.fm fix, volume shortcuts

This commit is contained in:
Trevor Squillario 2012-12-03 18:19:21 -05:00
parent c12537e061
commit 8643f01647
13 changed files with 223 additions and 97 deletions

View file

@ -120,16 +120,22 @@ function secondsToTime(secs) {
return time;
}
var msgIndex = 1;
function updateMessage(msg) {
function updateMessage(msg, autohide) {
if (msg != '') {
var id = msgIndex;
$('#messages').append('<span id=\"msg_' + id + '\" class="message">' + msg + '</span>');
$('#messages').fadeIn();
setTimeout(function () {
var el = '#msg_' + id;
$(el).fadeOut( function() { $(this).remove(); });
},
5000);
var el = '#msg_' + id;
if (autohide) {
setTimeout(function () {
$(el).fadeOut(function () { $(this).remove(); });
}, 10000);
} else {
$(el).click(function () {
$(el).fadeOut(function () { $(this).remove(); });
return false;
});
}
msgIndex++;
}
}