mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
#5007 Web client attempts to post notifications without permission, causing transfers not to update
This commit is contained in:
parent
0a656a1375
commit
f6efebb25c
1 changed files with 11 additions and 9 deletions
|
@ -11,15 +11,17 @@ $(document).ready(function () {
|
|||
toggle.show();
|
||||
updateMenuTitle();
|
||||
$(transmission).bind('downloadComplete seedingComplete', function (event, torrent) {
|
||||
var title = (event.type == 'downloadComplete' ? 'Download' : 'Seeding') + ' complete',
|
||||
content = torrent.getName(),
|
||||
notification;
|
||||
if (notificationsEnabled) {
|
||||
var title = (event.type == 'downloadComplete' ? 'Download' : 'Seeding') + ' complete',
|
||||
content = torrent.getName(),
|
||||
notification;
|
||||
|
||||
notification = window.webkitNotifications.createNotification('style/transmission/images/logo.png', title, content);
|
||||
notification.show();
|
||||
setTimeout(function () {
|
||||
notification.cancel();
|
||||
}, 5000);
|
||||
notification = window.webkitNotifications.createNotification('style/transmission/images/logo.png', title, content);
|
||||
notification.show();
|
||||
setTimeout(function () {
|
||||
notification.cancel();
|
||||
}, 5000);
|
||||
};
|
||||
});
|
||||
|
||||
function updateMenuTitle() {
|
||||
|
|
Loading…
Reference in a new issue