Update PNotify to latest master (2014-12-25) and add desktop notifications.

This commit is contained in:
tehspede 2015-02-14 20:25:38 +02:00
parent 3704e9a295
commit 65d30ddb47
3 changed files with 24 additions and 58 deletions

View file

@ -52,6 +52,8 @@
* Change IPT urls to reduce 301 redirection
* Add detection of file-system having no support for link creation (e.g. Unraid shares)
* Add catch exceptions when unable to cache a requests response
* Update PNotify to latest master (2014-12-25) for desktop notifications
* Add desktop notifications
[develop changelog]
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed

View file

@ -7,6 +7,7 @@ PNotify.prototype.options.width = '340px';
PNotify.prototype.options.shadow = false;
PNotify.prototype.options.addclass = 'stack-bottomright';
PNotify.prototype.options.stack = {'dir1': 'up', 'dir2': 'left', 'firstpos1': 25, 'firstpos2': 25};
PNotify.desktop.permission();
function check_notifications() {
if(document.visibilityState == 'visible') {
@ -16,8 +17,12 @@ function check_notifications() {
type: data.type,
hide: data.type == 'notice',
title: data.title,
text: data.message,
history: false
text: data.message.replace(/<\/?i>/ig, '*'),
history: false,
desktop: {
desktop: true,
icon: '../images/ico/apple-touch-icon-180x180.png'
}
});
});
});

File diff suppressed because one or more lines are too long