1mw.tools.notification = function (body, tag, icon) { 2 if (!body) return; 3 var n = window.Notification || window.webkitNotification || window.mozNotification; 4 if (typeof n == 'undefined') { 5 return false; 6 } 7 if (n.permission == 'granted') { 8 new n("MW Update", { 9 tag: tag || "Microweber", 10 body: body, 11 icon: icon || mw.settings.includes_url + "img/logomark.png" 12 }); 13 } 14 else if (n.permission == 'default') { 15 n.requestPermission(function (result) { 16 17 if (result == 'granted') { 18 return mw.tools.notification(body, tag, icon) 19 } 20 else if (result == 'denied') { 21 mw.notification.error('Notifications are blocked') 22 } 23 else if (result == 'default') { 24 mw.notification.warn('Notifications are canceled') 25 26 } 27 }); 28 } 29}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.