Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var SUZCT = SUZCT || {};
- SUZCT.NotificationManager = SUZCT.NotificationManager || {};
- document.addEventListener('DOMContentLoaded', function () {
- if (Notification.permission !== "granted")
- Notification.requestPermission();
- });
- $(document).ready(function () {
- SUZCT.NotificationManager.Hub = $.connection.notificationsHub;
- $.connection.hub.start();
- SUZCT.NotificationManager.Hub.client.SendNotification = function (message) {
- if (Notification.permission !== "granted") {
- Notification.requestPermission();
- }
- else {
- var notification = new Notification('SÚZ Český Těšín', {
- icon: '@Href("~/Images/logo_margin.png")',
- body: message,
- });
- notification.onclick = function () {
- window.open("http://www.suzct.cz");
- };
- };
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement