Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (window.webkitNotifications) {
- if (window.webkitNotifications.checkPermission() != 0){
- jQuery('#content>div>ul:eq(1)').append(
- '<li>' +
- '<a href="#" id="html5-notifications" title="Attiva le notifiche dei pollycokers" >' +
- '<img height="20px" ' +
- 'src="http://www.html5rocks.com/static/images/identity/html5-badge-h-performance.png"' +
- '/>' +
- '</a>' +
- '</li>');
- jQuery("#html5-notifications").click(function(){
- if (window.webkitNotifications.checkPermission() != 0) {
- window.webkitNotifications.requestPermission();
- }
- });
- }
- BPLN_Helper.notify = function (msg){
- if (window.webkitNotifications.checkPermission() == 0)
- window.webkitNotifications.createNotification(
- 'http://www.gravatar.com/avatar/7a1451683db87b00ffb3f85982ebbfb5',
- 'Nuova segnalazione su pollycoke',
- msg).show();
- else
- jq.achtung({message: msg, timeout:10});//show for 10 seconds
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement