1function b64EncodeUnicode(str) 2{ 3 return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, 4 function toSolidBytes(match, p1) { 5 return String.fromCharCode('0x' + p1); 6 })); 7} 8 9function reverse(s) 10{ 11 return s.split("").reverse().join(""); 12} 13 14function drawProgress() 15{ 16 if (typeof ProgressBar !== 'undefined') { 17 var progresses = $('.c-progress'); 18 if (progresses.length) { 19 progresses.each(function (ind, item) { 20 var rates = new ProgressBar.Circle(item, { 21 strokeWidth: 4, 22 color: '#e51d35' 23 }); 24 rates.animate($(item).data('value')); 25 }); 26 } 27 } 28} 29 30function number_format (number, decimals, decPoint, thousandsSep) 31{ 32 number = (number + '').replace(/[^0-9+\-Ee.]/g, '') 33 var n = !isFinite(+number) ? 0 : +number 34 var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals) 35 var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep 36 var dec = (typeof decPoint === 'undefined') ? '.' : decPoint 37 var s = '' 38 var toFixedFix = function (n, prec) { 39 var k = Math.pow(10, prec) 40 return '' + (Math.round(n * k) / k) 41 .toFixed(prec) 42 } 43 // @todo: for IE parseFloat(0.55).toFixed(0) = 0; 44 s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.') 45 if (s[0].length > 3) { 46 s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep) 47 } 48 if ((s[1] || '').length < prec) { 49 s[1] = s[1] || '' 50 s[1] += new Array(prec - s[1].length + 1).join('0') 51 } 52 return s.join(dec) 53} 54 55function createCookieSport(name,value,time){ 56 var date = new Date(); 57 date.setTime(date.getTime()+time); 58 var expires = "; expires="+date.toGMTString(); 59 document.cookie = name+"="+value+";"+expires; 60} 61 62function updateNavActive() 63{ 64 $('.header-btn').removeClass('active'); 65 if ($('.header-btn[href="' + _p +'"]').length > 0) { 66 $('.header-btn[href="' + _p +'"]').addClass('active'); 67 } 68} 69 70function printSeoSettings() 71{ 72 document.title = _seo.title; 73 $("meta[name=description]").attr("content", _seo.desc); 74 $("meta[name=keywords]").attr("content", _seo.keywords); 75} 76 77function comingSoon() 78{ 79 alert(_lang.coming_soon_game); 80} 81 82function alertLogin() 83{
84 alert(_lang.login_first.replace(/\\n/g, "\n")); 85} 86 87function under_maintenance() 88{ 89 alert(_lang.maintenance_msg); 90} 91 92function getDownload(cGame) { 93 $.ajax({ 94 type: 'POST', 95 data: { theme: theme , ap : '1', game:cGame }, 96 url: 'tp/download_page', 97 dataType: 'html' 98 }).success(function(data){ 99 $('#divdownload').html(data); 100 $('#divdownload').fadeIn("fast"); 101 }); 102} 103 104function langSelect(langvalue){ 105 eraseCookie(); 106 createCookie(langvalue,"30"); 107 location.reload(); 108 if(directmarket == 1){ 109 window.location.href= location.protocol + "//" + window.location.hostname + "/?lang=" + langvalue; 110 }else{ 111 window.location.href= location.protocol + "//" + window.location.hostname + "/" + country.toLowerCase() + "/?lang=" + langvalue; 112 } 113} 114 115function createCookie(value,days) { 116 var date = new Date(); 117 date.setTime(date.getTime()+(days*24*60*60*1000)); 118 var expires = "; expires="+date.toGMTString(); 119 document.cookie = "language="+value+";"+expires; 120} 121 122function eraseCookie(){ 123 createCookie('language',"",-1); 124} 125 126function setDailyCookie(cookieName) { 127 var setDate = new Date(); 128 setDate.setHours(23, 59, 59, 0); 129 var expiredDate = "expires=" + setDate.toGMTString(); 130 document.cookie = cookieName + "=1;" + expiredDate + ";path=/"; 131} 132 133function checkDailyCookie(cookieName) { 134 var name = cookieName + "="; 135 var decodedCookie = decodeURIComponent(document.cookie); 136 var ca = decodedCookie.split(';'); 137 for (var i = 0; i < ca.length; i++) { 138 var c = ca[i]; 139 while (c.charAt(0) == ' ') { 140 c = c.substring(1); 141 } 142 if (c.indexOf(name) == 0) { 143 return c.substring(name.length, c.length); 144 } 145 } 146 return ""; 147}
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.