Added support for firefox

This commit is contained in:
Kasper Rynning-Tønnesen
2015-02-15 17:00:56 +01:00
parent e2359d94fa
commit e45bf230c7

View File

@@ -399,7 +399,7 @@ function setBGimage(id){
function notifyUser(id, title) {
title= title.replace(/\\\'/g, "'").replace(/"/g,"'").replace(/&/g,"&");
if (Notification.permission === "granted" && !notified && document.hidden) {
var notification = new Notification("Now Playing", {body: title, icon: "http://i.ytimg.com/vi/"+id+"/hqdefault.jpg"});
var notification = new Notification("Now Playing", {body: title, icon: "http://i.ytimg.com/vi/"+id+"/mqdefault.jpg", iconUrl: "http://i.ytimg.com/vi/"+id+"/mqdefault.jpg"});
setTimeout(function(){
notification.close();
},10000);