1 2var loadJS = function(url, location, callback){ 3 4 var scriptTag = document.createElement('script'); 5 scriptTag.src = url; 6 scriptTag.type = 'text/javascript'; 7 scriptTag.async = true; 8 9 scriptTag.onload = callback; 10 scriptTag.onreadystatechange = callback; 11 12 location.appendChild(scriptTag); 13}; 14 15 16document.addEventListener('DOMContentLoaded', function(event) { 17 18 var zonesRemove; 19 20 if( navigator.userAgent.match(/Android/i) 21 || navigator.userAgent.match(/webOS/i) 22 || navigator.userAgent.match(/iPhone/i) 23 || navigator.userAgent.match(/iPad/i) 24 || navigator.userAgent.match(/iPod/i) 25 || navigator.userAgent.match(/BlackBerry/i) 26 || navigator.userAgent.match(/Windows Phone/i) 27 ) 28 { 29 //we are on mobile 30 zonesRemove = document.querySelectorAll('[data-s="d"]'); 31 32 } 33 else 34 { 35 //we are on desktop 36 zonesRemove = document.querySelectorAll('[data-s="m"]'); 37 } 38 39 //remove the unwanted zones 40 Array.prototype.forEach.call( zonesRemove, function( node ) { 41 node.parentNode.removeChild( node ); 42 }); 43 44 //loads the ads in the remaining zones 45 loadJS("//ads.newsbook.com.mt/www/delivery/asyncjs.php", document.body, function() { }); 46 47}); 48 49
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.