Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
410 var notification = new Notification( | 410 var notification = new Notification( |
411 title, | 411 title, |
412 { | 412 { |
413 lang: Utils.appLocale, | 413 lang: Utils.appLocale, |
414 dir: ext.i18n.getMessage("@@bidi_dir"), | 414 dir: ext.i18n.getMessage("@@bidi_dir"), |
415 body: message, | 415 body: message, |
416 icon: iconData | 416 icon: iconData |
417 } | 417 } |
418 ); | 418 ); |
419 | 419 |
420 notification.onclick = openNotificationLinks; | 420 notification.addEventListener("click", openNotificationLinks); |
421 notification.onclose = notificationClosed; | 421 notification.addEventListener("close", notificationClosed); |
Wladimir Palant
2015/01/13 07:39:16
I certainly prefer addEventListener() to onclick -
Sebastian Noack
2015/01/13 12:30:20
Thanks for pointing this out. I just overlooked th
| |
422 }); | 422 }); |
423 } | 423 } |
424 else | 424 else |
425 { | 425 { |
426 var message = title + "\n" + message; | 426 var message = title + "\n" + message; |
427 if (hasLinks) | 427 if (hasLinks) |
428 message += "\n\n" + ext.i18n.getMessage("notification_with_buttons"); | 428 message += "\n\n" + ext.i18n.getMessage("notification_with_buttons"); |
429 | 429 |
430 var approved = confirm(message); | 430 var approved = confirm(message); |
431 if (activeNotification.type === "question") | 431 if (activeNotification.type === "question") |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 page.sendMessage({type: "clickhide-deactivate"}); | 578 page.sendMessage({type: "clickhide-deactivate"}); |
579 refreshIconAndContextMenu(page); | 579 refreshIconAndContextMenu(page); |
580 }); | 580 }); |
581 | 581 |
582 setTimeout(function() | 582 setTimeout(function() |
583 { | 583 { |
584 var notificationToShow = NotificationStorage.getNextToShow(); | 584 var notificationToShow = NotificationStorage.getNextToShow(); |
585 if (notificationToShow) | 585 if (notificationToShow) |
586 showNotification(notificationToShow); | 586 showNotification(notificationToShow); |
587 }, 3 * 60 * 1000); | 587 }, 3 * 60 * 1000); |
LEFT | RIGHT |