1 2// !!!!!!!!!!!!! You have to add another class name "AllBanners" to all banners in Grid !!!!!!!!!! 3// example ==> <script>dbsPrintBanner(7,"<div class='AllBanners bannerContainer'>","</div>");</script> 4 5// ********* About this 2 fumctions ********* 6// ******************************************************** 7// Firefox banners blocker block banners that have ? in <img> src or <object> data, for example src="_Uploads/dbsBanners/harshama_Hp.jpg?BannerID=28" 8// ( Can't tell exactly about Chrome ) 9// This is changed here to "_Uploads/dbsBanners/harshama_Hp.jpg" 10// Firefox banners blocker adds to this banners also a class like class=""tbsyscjnsgardxndhbci" , and this removed here too 11// Chrome banners blocker adds to this banners few hide css connands, also changes the width and height to 0 , and this removed and changed here too 12 13$(window).load(function() { 14 15 // --------------- UnHide image banners **************/ 16 setTimeout(function() { 17 $('.AllBanners img, #our-clients .owl-carousel img').each(function() { 18 var url = location.href; 19 var theImg = $(this); 20 var imgSrc = theImg.attr('src').toLowerCase(); 21 var cleanSrc = imgSrc.split('?')[0]; 22 theImg.attr('style',''); // for chrome added hidden styles 23 theImg.attr('src',cleanSrc); 24 theImg.attr('class',''); // it has class only in Firefox - add strange classname that hide the banner 25 theImg.parent('a').css('display','table'); // for firefox 26 //theImg.css('background','url("'+cleanSrc+'")'); // sometimes chrome blocks image loading, maybe this will help ? 27 theImg.parent('a').append(theImg.clone()); 28 theImg.remove(); 29 }); 30 },200); 31 32 /*$('.AllBanners img, .owl-carousel img').each(function() { 33 var url = location.href; 34 var theImg = $(this); 35 $.get(url, function(data) { //----- get the source code to find image's original width and height, before chrome changed it to 0 36 //alert(data); 37 try { 38 var imgSrc = theImg.attr('src').toLowerCase(); 39 var cleanSrc = imgSrc.split('?')[0]; 40 //alert(imgSrc); 41 var dataP_1 = data.toLowerCase().split(imgSrc)[0]; 42 var dataP_2 = data.toLowerCase().split(imgSrc)[1]; 43 theImg.attr('style',''); // for chrome added hidden styles 44 theImg.attr('src',cleanSrc); 45 theImg.attr('class',''); // it has class only in Firefox - add strange classname that hide the banner 46 theImg.css('background','url("'+cleanSrc+'")'); // sometimes chrome blocks image loading, maybe this will help ? 47 try { 48 var imgTag1 = '<img ' + dataP_1.split('<img').pop(-1) + 'src="' + imgSrc + '" '; 49 var imgTag2 = dataP_2.split('>')[0] + '>'; 50 var imgTag = imgTag1 + imgTag2; 51 //console.log(imgTag); 52 if (imgTag.indexOf('width="') != -1) { 53 var imgWidth = imgTag.split('width="')[1].split('"')[0]; 54 //console.log(imgWidth); 55 theImg.css('width',imgWidth+'px'); 56 } 57 if (imgTag.indexOf('height="') != -1) { 58 var imgHight = imgTag.split('height="')[1].split('"')[0]; 59 //console.log(imgHight); 60 theImg.css('height',imgHight+'px'); 61 } 62 //----- change html of img to make the changrs work 63 var imgSplit = theImg.parent().html().toLowerCase().split('src'); 64 var imgP_1 = imgSplit[0]; 65 var imgP_2 = imgSplit[1]; 66 var newImg_html = imgP_1 + ' src' + imgP_2 67 //alert(newImg_html); 68 theImg.parent().html(newImg_html); 69 } 70 catch(err) { 71 //Handle errors here 72 } 73 } 74 catch(err) { 75 //Handle errors here 76 } 77 }); 78 });*/ 79 80 // --------------- UnHide flash banners **************/ 81 $('.AllBanners object').each(function() { 82 //alert($(this).parent().html()); 83 var newObject_html = $(this).parent().html().toLowerCase(); // this code includes also the script before the actual result code 84 //----- get the width and height, brfore chrome changed it to 0 85 var objectWidth = 0; 86 var objectHight = 0; 87 if (newObject_html.indexOf('width=\"') != -1) { 88 objectWidth = newObject_html.split('width=\"')[1].split('"')[0]; 89 } 90 if (newObject_html.indexOf('height=\"') != -1) { 91 objectHight = newObject_html.split('height=\"')[1].split('"')[0]; 92 } 93 //console.log(objectWidth +' '+ objectHight); 94 //--- 95 newObject_html = newObject_html.split('<\/script>')[1]; // this is the actual script-result code 96 try { 97 var objectSrc = $(this).attr('data').toLowerCase(); 98 var src_toRemove = '?' + objectSrc.split('?')[1]; 99 newObject_html = newObject_html.replace(src_toRemove,"").replace(src_toRemove,"").replace(src_toRemove,""); 100 if ($(this).is('[class]')) { // check if <object> has class attribute - it has only in Firefox - the strange classname that hide the banner 101 var class_toRemove = ' class="' + newObject_html.split('class="')[1].split('"')[0] + '"'; 102 //alert('class_toRemove= ' + class_toRemove); 103 newObject_html = newObject_html.replace(class_toRemove,""); 104 } 105 if (newObject_html.indexOf('le="') != -1) { // check if <object> has style attribute - for chrome added hidden styles 106 var style_toRemove = newObject_html.split('le="')[1].split('"')[0]; // [chrome don't let use the whole word (style) in the code] 107 //console.log('style_toRemove= ' + style_toRemove); 108 } 109 newObject_html = newObject_html.replace(style_toRemove,'width:' + objectWidth + 'px;' + 'height:' + objectHight + 'px;'); 110 $(this).parent().html(newObject_html); 111 } 112 catch(err) { 113 //Handle errors here 114 } 115 }); 116 117});
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.