"notification for browser"
Bootstrap 3.3.0 Snippet by lelelaileabc

<div class="container"> <div class="row"> <button type="button" class="btn btn-primary" onclick="show()">Notify me!</button> </div> </div>
function show(){ var title = "new version" , options = { body: "user can download files from site!", icon: "http://bootsnipp.com/img/avatars/80371038613994cd96537912756058cb63fd6adb.jpg" }; if (!("Notification" in window)) { alert("This browser does not support desktop notification"); } else if (Notification.permission === "granted") { var n = new Notification(title, options); n.onshow=function(){ setTimeout(n.close.bind(n), 2000); } n.onclick = function () { n.close(); }; } else if (Notification.permission !== 'denied') { Notification.requestPermission(function (permission) { if (permission === "granted") { var n = new Notification(title, options); } }); } }

Questions / Comments:

Related: See More