• Chrome, Safari notifikācijas

    function notify(html) {
    var havePermission = window.webkitNotifications.checkPermission();
    if (havePermission == 0) {
    // 0 is PERMISSION_ALLOWED
    var notification = window.webkitNotifications.createNotification(
    'http://www.kautkas/abc.jpg',
    'title',
    ' description'
    );

    notification.onclick = function () {
    //window.open("http://www.linksuzurli.lv");
    notification.cancel();
    }
    notification.show();
    // Hide the notification after the timeout
    setTimeout(function(){
    notification.cancel()
    }, 30000);

    } else {
    window.webkitNotifications.requestPermission();
    }
    }