1(function(window){ 2 window.htmlentities = { 3 /** 4 * Converts a string to its html characters completely. 5 * 6 * @param {String} str String with unescaped HTML characters 7 **/ 8 encode : function(str) { 9 var buf = []; 10 11 for (var i=str.length-1;i>=0;i--) { 12 buf.unshift(['&#', str[i].charCodeAt(), ';'].join('')); 13 } 14 15 return buf.join(''); 16 }, 17 /** 18 * Converts an html characterSet into its original character. 19 * 20 * @param {String} str htmlSet entities 21 **/ 22 decode : function(str) { 23 return str.replace(/&#(\d+);/g, function(match, dec) { 24 return String.fromCharCode(dec); 25 }); 26 } 27 }; 28})(window); 29 30function isMobile() { 31 if ( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) ){ 32 return true; 33 } 34 else { 35 return false; 36 } 37} 38 39function elementScrolled(elem, fullWindow) { 40 var docViewTop = jQuery(fullWindow).scrollTop(); 41 var docViewBottom = docViewTop + jQuery(fullWindow).height(); 42 var elemTop = jQuery(elem).offset().top; 43 return ((elemTop <= docViewBottom) && (elemTop >= docViewTop)); 44} 45 46function isBanner(isBannerBoolean, postLink, postTitle, bannerLink, option) { 47 if(isBannerBoolean && option == "link") { 48 return bannerLink; 49 } 50 else if(isBannerBoolean && option == "title") { 51 return; 52 } 53 else if(isBannerBoolean && option == "target") { 54 return "_blank"; 55 } 56 else if(!isBannerBoolean && option == "link") { 57 return postLink; 58 } 59 else if(!isBannerBoolean && option == "title") { 60 return htmlentities.decode(postTitle); 61 } 62 else if(!isBannerBoolean && option == "target") { 63 return "_self"; 64 } 65}
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.