Notifications for Chrome

This commit is contained in:
Tobias Reich 2014-02-04 22:26:06 +01:00
parent ea10c68631
commit fd995fb7dc
3 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -43,6 +43,8 @@ contextMenu = {
mouse_y -= $(document).scrollTop(); mouse_y -= $(document).scrollTop();
upload.notify();
contextMenu.fns = [ contextMenu.fns = [
function() { $("#upload_files").click() }, function() { $("#upload_files").click() },
function() { upload.start.url() }, function() { upload.start.url() },

View File

@ -44,7 +44,7 @@ upload = {
if (window.webkitNotifications.checkPermission()!=0) window.webkitNotifications.requestPermission(); if (window.webkitNotifications.checkPermission()!=0) window.webkitNotifications.requestPermission();
if (window.webkitNotifications.checkPermission()==0) { if (window.webkitNotifications.checkPermission()==0&&title) {
popup = window.webkitNotifications.createNotification("", title, "You can now manage your new photo(s)."); popup = window.webkitNotifications.createNotification("", title, "You can now manage your new photo(s).");
popup.show(); popup.show();
} }