User:Lience/chat.js

// Notifications. Made by Siberian Watcher (Сибирский Смотритель) function sendNotification(title, options) {if (Notification.permission === "granted") {var notification = new Notification(title, options);} else if (Notification.permission !== 'denied') {Notification.requestPermission(function (permission) {if (permission === "granted") {var notification = new Notification(title, options);}});}} setInterval(function {   if($('.Chat li:last-child').has('.ping').length && !$('.Chat li:last-child').hasClass('notified')) {        sendNotification($('.Chat li:last-child .username').text, { body: $('.Chat li:last-child .ping').text, icon: $('.Chat li:last-child > img').attr('src').replace(/scale\-to\-width\-down\/28/, 'scale-to-width-down/150'), dir: 'auto' });       $('.Chat li:last-child').addClass('notified');    }}, 500);