Widget online user problem? Ini dia widget alternatif.


Beberapa minggu ni aku perasan masa bukak blog aku dan baca blog rakan blogger, widget online user tak munculkan diri. Padahal sebelum ni elok je.


Widget ni sepatutnya paparkan bilangan pengunjung atau pembaca sesebuah blog secara live. Maksudnya kalau 10 orang sedang baca blog aku, tulisan 10 Onlline User lah yang akan muncul. Tapi entah kenapa, kosong je. Takde muncul apa-apa tulisan.


Bila aku search pasal ni, katanya website yang hasilkan widget ni (freehostedscripts.net) tengah down. Tak tahu lah aku sebab apa. Kalau website ni down, maka tak dapat lah guna widget tu lagi.

Alternatif widget online user


Aku gigih cari widget yang sama macam ni. Widget yang hanya ada tulisan Online User. Simple. Tak banyak yang aku jumpa. Tapi ada 1 yang aku rasa boleh lah guna sebagai pengganti widget dari freehostedscripts.net ni.


Boleh guna HTML code yang default dari website Free Live Traffic Feed. Senang. Tak payah pening kepala. Masukkan je code bawah ni dalam Layout > Add a Gadget > HTML/JavaScript.

<script type="text/javascript" src="https://cdn.livetrafficfeed.com/static/online/live.v2.js?text=ffffff&bg=e61c1c&ro=0&tz=Asia%2FKuala_Lumpur"></script><noscript id="LTF_online_website"><a href="http://livetrafficfeed.com/online-counter">Site Online Counter</a></noscript>

Versi customized


Aku godek code dan customize widget ni supaya jadi sama dengan widget dari freehostedscripts.net yang dah tak muncul tu. Hasilnya boleh tengok dalam gambar kat bawah ni.


Kalau nak yang macam aku punya ni, boleh guna HTML code yang aku dah edit. Ada beberapa part yang boleh ubah sendiri.

<center>

<script type="text/javascript">

!function(m,y,L,b){function f(e){var t=L.createElement("a");return t.href=e,t.hostname.replace(/^www\./,"")}function v(e){for(var t=e+"=",n=L.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return null}function a(e,t,n){var i=L.createElement("script");i.type="text/javascript",i.id="LTF_"+e,i.readyState?i.onreadystatechange=function(){"loaded"!=i.readyState&&"complete"!=i.readyState||(i.onreadystatechange=null,n(),i.parentNode.removeChild(i))}:(i.onload=function(){n(),i.parentNode.removeChild(i)},i.onerror=function(e){n(),i.parentNode.removeChild(i),console.log("error load js")}),i.src=t,L.getElementsByTagName("head")[0].appendChild(i)}function _(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<50;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function w(e,t,n,i){var o=L.createElement("div");o.id="LTF_onlcount_"+i,o.style.display="inline-block",o.style.fontFamily="'Work Sans', sans-serif",o.style.fontSize="14px",o.style.letterSpacing="0.05em",o.style.fontDisplay="swap",o.style.color="#"+e,o.style.position="absolute",o.style.fontWeight="400",o.style.width="280px",o.style.height="15px",o.style.top="0px",o.style.left="0px",o.style.overflow="hidden",o.style.fontStyle="normal",o.style.textTransform="none",o.style.textDecoration="none",o.style.letterSpacing="0px",o.style.wordSpacing="0px",o.style.padding="0px",o.style.margin="4px 0 0 0",o.style.textAlign="center",o.style.lineHeight="normal",o.style.webkitTextSizeAdjust="none",o.style.direction="ltr",o.style.textShadow="none",o.style.verticalAlign="baseline",o.innerHTML=t,n.appendChild(o)}function F(e,t){for(var n=L.getElementsByTagName("script"),i=0;i<n.length;i++)if(0<n[i].src.indexOf(t))return n[i].parentNode.insertBefore(e,n[i].nextSibling),!0;return!1}function u(e){var t=e;if(99999<=e){for(var n=Math.floor((""+e).length/3),i="",o=2;1<=o;o--)if(((i=parseFloat((0!=n?e/Math.pow(1e3,n):e).toPrecision(o)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break;i%1!=0&&(i=i.toFixed(1)),t=i+["","K","M","B","T"][n]}return t}function Y(e,t){return"unknown"==e||"localhost"==e||!!new RegExp("^https?://(?:www.)?"+e+t,"i").test(y.location.href)}function E(){return y!=y.top}function T(e,t){for(var n=e.split("&"),i=0;i<n.length;i++){var o=n[i].split("=");if(o[0]==t)return o[1]}return""}function I(e,t,n,o,a){var r,l,d,c,s;y.navigator.cookieEnabled&&(r="YXBwLmpz",l=m.userAgent||m.vendor||y.opera,d=Math.floor(100*Math.random()),t=t,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(l)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(l.substr(0,4)))&&(t=n),n=function(e,t){var n=["YmFyZQ==","bmFrZWQ=","bnVkZQ==","b3JhbA==","c2V4","YW5hbA==","YmFiZQ==","YmhhcmF0aA==","Ym9vYg==","YnJlYXN0","YnVzZW4=","YnVzdHk=","Y2xpdA==","Y3VudA==","ZGljaw==","ZmV0aXNo","ZnVjaw==","aG9vdGVy","bHVzdA==","b3JneQ==","cGVuaXM=","cG9ybg==","cG9ybm8=","cHVwcGVy","cHVzc3k=","cm90dGVu","c2hpdA==","c211dHB1bXA=","dGVlbg==","eHh4","aGVudGFp","cHJldGVlbg==","Yml0Y2g=","ZW5zZXN0","YWxjb2hvbA==","dG9iYWNjbw==","YWR1bHQ=","aGVyb2lu","a2lsbA==","Y2FzaW5v","bnVkaQ==","eHZpZGVv","Z2F5","eG54eA==","YXNz","YW51cw==","YXJzZQ==","YmFzdGFyZA==","Ym9vbmc=","c3Vjaw==","Y29vbg==","Y3JhcA==","ZGFtbg==","ZGFybg==","ZGljaw==","ZGlydHk=","ZG91Y2hl","ZHVtbXk=","ZXJlY3Q=","ZXJvdGlj","ZXNjb3J0","aG9tb2Vyb3RpYw==","bGVzYmlhbg==","bmVncm8=","bmlnZ2Vy","b3JnYXM=","cGlzcw==","cmV0YXJk","c2FkaXN0","c2x1dA==","dGl0cw==","dmlhZ3Jh","d2hvcmU=","eGhhbXM=","amF2","YnV0dA==","dmFnaW5h","czN4","cmVkdHViZQ==","Y29uZG9t","cG9ybmh1Yg==","c2Vrcw==","4YuI4Yiy4Yml","2KzZhtiz","2YjYp9mCINiw2YPYsdmK","1b3VpdaE1b3VqA==","Y2luc2k=","0YHRjdC60YE=","0L\/RgNGN0LfQtdGA0LLQsNGC0YvRng==","4Kay4Ka\/4KaZ4KeN4KaX","0L\/RgNC10LfQtdGA0LLQsNGC0LjQsg==","cHJlc2VydmF0aXU=","a3Vnb25hbmE=","a29uZG9tdQ==","6YG\/5a2V5aWX","6Zi06YOo","6Zi06YGT","6Zi06IyO","6Zi05q+b","6Zi05oi3","6Ziz5YW3","5aW4","6LWj5oKo5aiY","6IKb5Lqk","6IKP","57K+5a2Q","5oOF6Imy","5oCn5Lqk","5by65aW4","5Lmz","5bGM","5bGE","5bGB6IKh","5bGB55y8","5bCE57K+","5aem","5aW4","5YGa54ix","5Lqk6YWN","5oCn5Yir","c2Vzc28=","a8O4bg==","Y29uZG9vbQ==","bGVzYmlhbmFz","ZXh0cmVtYSBzdW1pc2nDs24=","dGV0YXM=","c2V4bw==","ZXLDs3RpY29z","Y29uZMOzbg==","c3VndQ==","a2FzYXJpYW4=","c3VrdXB1b2xp","cHLDqXNlcnZhdGlm","a29uZG9taQ==","4YOh4YOU4YOl4YOh4YOY","z4bPjc67zr8=","4Kq44KuH4KqV4KuN4Kq4","c8Ooa3M=","amltYSdp","d2FoaW5l","16HXp9eh","4KSy4KS\/4KSC4KSX","4KSV4KSC4KSh4KWL4KSu","c3pleA==","a3lubMOtZg==","bW1la+G7jWFo4bul","Ym9rZXA=","YmVyY2ludGE=","bmdlbnRvdA==","bWVtZWs=","ZGV3YXNh","cGVya29zYQ==","dG9rZXQ=","a29udG9s","YnVnaWw=","Z27DqWFz","6Iaj","6IKb6ZaA","6KO4","5YuD","5aOy5pil","57K+5ray","55Sf5q6W5Zmo","5oCn5Lqk","5bCE57K+","5by35aem","6Zmw5q+b","44Ko44Ot","44Os44Kk44OX","44Od44Or44OO","44Oa44OL44K5","6KO444Gu","6Zmw6IyO","44Kv44Oq44OI44Oq44K5","44OV44Kh44OD44Kv","5oCn5Yil","5aCA5Y2a5pit","44Kz44Oz44OJ44O844Og","amluaXM=","4LKy4LOI4LKC4LKX4LK\/4LKV4LKk4LOG","0YHQtdC60YE=","4Z6a4Z694Z6Y4Z6X4Z+B4Z6R","7IS57Iqk","7L2Y64+U","Y2luc8OueWV0","0LbRi9C90YvRgQ==","4LuA4Lqe4LqU","ZHppbXVtcw==","R2VzY2hsZWNodA==","ZmlyYWlzYW5hIGFyYS1ub2Zv","a29uZG9t","4LSy4LS\/4LSC4LSX4LSC","4LSV4LWL4LSj4LWN4LSf4LSC","d2FoaW5l","4KSy4KS\/4KSC4KSX","0YXSr9C50YE=","0JHRjdC70LPRjdCy0Yc=","4YCc4YCt4YCE4YC6","4YCA4YC94YCU4YC64YCS4YCv4YC24YC4","4KS44KWH4KSV4KWN4KS4","a2rDuG5u","2KzZhtiz24zYqg==","2KfYsdiq2KjYp9i3INis2YbYs9uM","cHJlc2VydmF0aXZv","4Ki44KmI4KiV4Ki4","ZmV1c3VhaWdh","ZmVpc2U=","0YHQtdC6","dGhvYmFsYW5v","enZlcGFib25kZQ==","2KzZhtiz2Yo=","4La94LeS4LaC4Lac4LeS4Laa","c3BvbA==","amluc2k=","ZXLDs3RpY2E=","ZXLDs3RpY29z","YWR1bHRvcw==","c3RyaXBwZXJz","bmdvbm8=","0rfQuNC90YE=","4K6a4K+G4K6V4K+N4K644K+N","4LC44LGG4LCV4LGN4LC44LGN","4LiC4Li14LmJ","4LiI4Li04LmL4Lih","4LmA4Lie4Lio","4LiI4Li54LmL","4LiU4Lit4LiB4LiX4Lit4LiH","4LiV4Li54LiU","4LmA4Lii4LmH4LiU","4Lir4Lil4Lix4LmI4LiH","4Lir4LmI4Liy","4Lir4Li1","4LiW4Li44LiH4Lii4Liy4LiH","cHJlemVydmF0aWY=","2KzZhtiz","amlucw==","xJHhu4t0","eG\/huqFj","aGnhur9wIGTDom0=","aMOjbSBoaeG6v3A=","Z2nhur90","a2jhu49hIHRow6Ju","ZMawxqFuZyB24bqtdA==","w6JtIHbhuq10","xJHDrXQ=","dsO6","bmjFqSBob2E=","YmFvIGNhbyBzdQ==","Z2lhbyBj4bqldQ==","cmh5dw==","bmdlc29uZG8=","15LXotep15zXoteb15g=","aWJhbG9wbw==","dWJ1bGlsaQ=="],t=t.trim().toLowerCase();for(i=0;i<n.length;i++)n[i]=x._d(n[i]).toString();var o=new RegExp(n.join("|"),"gi");return!!o.test(e)||!!o.test(t)}(y.location.href,L.title),a!=e&&d<t&&(1==o?0==n?s="bWFpbi5qcw==":1==n&&(s=r):s=2==o?r:"Y29yZS5qcw==",(c=L.createElement("script")).src="https://"+e+"/static/v4/"+x._d(s),c.onload=function(){LTF_ads(),c.parentNode.removeChild(c)},0<L.getElementsByTagName("head").length&&L.getElementsByTagName("head")[0].appendChild(c)))}function C(t,n,e,i){var o=setInterval(function(){var e;1==y.navigator.onLine&&"visible"==L.visibilityState&&function(e){if(e){e=e.getBoundingClientRect();return 0<=e.top&&0<=e.left&&e.bottom<=(y.innerHeight||L.documentElement.clientHeight)&&e.right<=(y.innerWidth||L.documentElement.clientWidth)}}(L.getElementById("LTF_onl_"+n))&&(e=_(),a(e,t,function(){void 0!==y["LTF_olc_"+n]?(i!=y["LTF_olc_"+n]&&(i=y["LTF_olc_"+n],setTimeout(function(){L.getElementById("LTF_onlcount_"+n)&&(L.getElementById("LTF_onlcount_"+n).innerHTML="",setTimeout(function(){L.getElementById("LTF_onlcount_"+n).innerHTML=u(i)+" Online User"},250))},250)),y["LTF_olc_"+n]=b):clearInterval(o)}))},e)}function k(s,m,e,p,g,n,i,o,h){a(m,e,function(){var c,e,t;void 0!==y["LTF_ONL_"+m]?(c="//"+s+"/static/online/images.png?bg="+n,(e=L.createElement("img")).onload=function(){var e=L.createElement("div");e.id="LTF_onl_"+m,e.style.position="relative",e.style.zindex="99999999",e.style.display="inline-block",e.style.width="280px",e.style.height="21px",e.style.overflow="hidden",e.style.cursor="pointer",e.style.backgroundImage="url("+c+")",e.style.backgroundRepeat="no-repeat",e.style.backgroundPosition="0px 0px",e.title="";var t=u(y["LTF_ONL_"+m].a)+" Online User";w(g,t,e,m);var n,i,o,a,r,l,d=y["LTF_ONL_"+m].b;e.onclick=function(){0==d?y.open("http://"+s+"/live/"+p):y.open("http://"+s+"/online-counter")},0==F(e,s+"/static/online/live.v2.js")?n=setInterval(function(){L.getElementById("LTF_online_website")&&(L.getElementById("LTF_online_website").parentNode.insertBefore(e,L.getElementById("LTF_online_website")),L.getElementById("LTF_online_website").parentNode.removeChild(L.getElementById("LTF_online_website")),clearInterval(n))},0):L.getElementById("LTF_online_website")&&L.getElementById("LTF_online_website").parentNode.removeChild(L.getElementById("LTF_online_website")),C(h,m,y["LTF_ONL_"+m].i,y["LTF_ONL_"+m].a),I(s,y["LTF_ONL_"+m].f,y["LTF_ONL_"+m].e,y["LTF_ONL_"+m].d,p),0==y["LTF_ONL_"+m].g&&(r=y["LTF_ONL_"+m].c,!y.navigator.cookieEnabled||1!=v("LTF_approve")&&0<=["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HU","HR","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"].indexOf(r)&&(0<L.getElementsByTagName("body").length&&null==L.getElementById("LTF_GDPR_Compliant")&&((l=new Date).setTime(l.getTime()+31536e6),(r=L.createElement("div")).id="LTF_GDPR_Compliant",r.style="padding:0 !important;max-width:24em;flex-direction:column;color:#FFFFFF;background-color:#252E39;bottom:1em;right:1em;position:fixed;overflow:hidden;box-sizing:border-box;font-family:Helvetica,Calibri,Arial,sans-serif;font-size:16px;line-height:1.5em;flex-wrap:nowrap;z-index:9999;opacity:1;transition:opacity 1s ease;",L.getElementsByTagName("body")[0].appendChild(r),r.innerHTML='<span style="margin:2em 2em 1.5em;display:block;margin-bottom:1em;">This website use different technologies such as cookies, IP, geo location and device information to deliver its services and analyze traffic. Infomation about your use of this site is shared public. By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.<a style="color:#FFFFFF !important;opacity:.8;display:inline-block;padding:.2em;cursor:pointer;text-decoration:underline;" href="http://livetrafficfeed.com/gdpr" target="_blank">Learn more</a></span><div style="flex:1;display:flex;align-items:center;align-content:space-between;color:#FFFFFF;"><input type="hidden" id="LTF_GDPR" value="0"><a onclick="document.getElementById(\'LTF_GDPR\').value=1;this.parentNode.parentNode.style.display=\'none\';document.cookie=\'LTF_approve=1; expires='+l.toUTCString()+'; path=/;SameSite=None; Secure\';" style="width:100%;color:#FFFFFF;background-color:#14A7CD;border-color:transparent;display:block;padding:.4em .8em;font-size:.9em;font-weight:700;border-width:2px;border-style:solid;text-align:center;white-space:nowrap;cursor:pointer;">Got it!</a></div>'),i=setInterval(function(){0<parseInt(L.getElementById("LTF_GDPR").value)&&(clearInterval(i),L.getElementById("LTF_GDPR_Compliant").style.display="none")},500))),0==E()&&"undefined"!=typeof Storage&&localStorage.setItem("LTFSESSID",y["LTF_ONL_"+m].h),y.navigator.cookieEnabled&&(o="LTFSESSID",a=y["LTF_ONL_"+m].h,t="",(r=365)&&((l=new Date).setTime(l.getTime()+24*r*60*60*1e3),t="; expires="+l.toUTCString()),L.cookie=o+"="+(a||"")+t+"; path=/;SameSite=None; Secure"),y["LTF_ONL_"+m]=b},e.src=c):(console.log("Online counter Undefined!"),(t=L.createElement("iframe")).setAttribute("src","https://"+s+"/static/online/ifarme.html?url="+encodeURIComponent(y.top.location.href)+"&title="+encodeURIComponent(L.title)+"&text="+g+"&bg="+n+"&timezone="+i+"&root="+o),t.setAttribute("scrolling","no"),t.setAttribute("frameborder","0"),t.setAttribute("style","overflow:hidden;border:none;"),t.onload=function(){t.contentWindow.postMessage("online-counter","*"),y.addEventListener("message",function(e){e.origin=="https://"+s&&"online-counter"==e.data.k&&(t.style.width=e.data.w+"px",t.style.height=e.data.h+"px")},!1)},0==F(t,s+"/static/online/live.v2.js")?L.getElementById("LTF_online_website")&&(L.getElementById("LTF_online_website").parentNode.insertBefore(t,L.getElementById("LTF_online_website")),L.getElementById("LTF_online_website").parentNode.removeChild(L.getElementById("LTF_online_website"))):L.getElementById("LTF_online_website")&&L.getElementById("LTF_online_website").parentNode.removeChild(L.getElementById("LTF_online_website")))})}function e(){var n=x._d("bGl2ZXRyYWZmaWNmZWVkLmNvbQ=="),e=function(e){for(var t=L.getElementsByTagName("script"),n=0;n<t.length;n++)if(0==t[n].src.indexOf("http://cdn."+e)||0==t[n].src.indexOf("https://cdn."+e)||0==t[n].src.indexOf("http://"+e)||0==t[n].src.indexOf("https://"+e))return t[n].src.replace(/^[^\?]+\??/,"");return""}(n+"/static/online/"),t=parseInt(T(e,"ro"));isNaN(t)&&L.getElementById("LTF_online_website")&&(t=parseInt(L.getElementById("LTF_online_website").getAttribute("data-root")));var i=T(e,"text");i||L.getElementById("LTF_online_website")&&(i=L.getElementById("LTF_online_website").getAttribute("data-text")),0==/^(?:[A-Fa-f0-9]{3}){1,2}$/i.test(i)&&(i="000000");var o=T(e,"bg");o||L.getElementById("LTF_online_website")&&(o=L.getElementById("LTF_online_website").getAttribute("data-background")),0==/^(?:[A-Fa-f0-9]{3}){1,2}$/i.test(o)&&(o="ffffff"),o==i&&(i="ffffff",o="ffffff"),0!=parseInt(t)&&(t=1);var a=T(e,"tz");a||L.getElementById("LTF_online_website")&&(a=L.getElementById("LTF_online_website").getAttribute("data-time"));var r=encodeURIComponent(y.location.href),l=encodeURIComponent(L.referrer);1==E()&&(r="undefined"!==y.LTF_GET_URL?encodeURIComponent(y.LTF_GET_URL):encodeURIComponent(L.referrer),l=""),200<r.length&&(r=encodeURIComponent(y.location.href.split("?")[0])),200<l.length&&(l=encodeURIComponent(L.referrer.split("?")[0]));var d,c=encodeURIComponent(L.title.replace(/[\s\r\n\t]+/g," ").substring(0,50)),s=f(decodeURIComponent(r));new RegExp(".blogspot.(?:com|[a-z]{2,3}|[a-z]{2,3}.[a-z]{2})","g").test(s)?(s=(s=s.split("."))[0]+".blogspot.com",d=c,1==(e=(d=decodeURIComponent(d)).split(":")).length||(d="",e.forEach(function(e,t){0<parseInt(t)&&(1==parseInt(t)?d+=e:d+=": "+e)}),d=d.trim()),c=encodeURIComponent(d)):1==t&&(g=decodeURIComponent(r),u=f(g),p=u.split("."),2<(g=p.length)&&(u=p[g-2]+"."+p[g-1],2==p[g-1].length&&2==p[g-1].length&&(u=p[g-3]+"."+u)),s=u);var m,p=y.screen.width||y.innerWidth||L.documentElement.clientWidth||L.body.clientWidth,g=y.screen.height||y.innerHeight||L.documentElement.clientHeight||L.body.clientHeight;y.navigator.cookieEnabled&&null!=(m=v("LTFSESSID"))||(m=""),""==m&&(0==E()&&"undefined"!=typeof Storage&&null!=(m=localStorage.getItem("LTFSESSID"))||(m=""));var h,b,u=/^https?:\/\/([^\/]+)/i.test(location.href)?RegExp.$1:"unknown";0==Y(u,"/wp-admin/")||0==Y(u,"/install/")?(h=_(),l="//"+n+"/static/online/"+x._d("Y2hlY2sudjIuanM=")+"?ranid="+h+"&cookie_id="+m+"&clientwidth="+p+"&clientheight="+g+"&link="+r+"&title="+c+"&referrer="+l+"&timezone="+a+"&root="+t,r="//"+n+"/static/online/"+x._d("dXBkYXRlLmpz")+"?ranid="+h+"&l="+r+"&root="+t,k(n,h,l,s,i,o,a,t,r)):(h=_(),b="//"+n+"/static/online/images.png?bg="+o,(o=L.createElement("img")).onload=function(){var e=L.createElement("div");e.id="LTF_onl_"+h,e.style.position="relative",e.style.zindex="99999999",e.style.display="inline-block",e.style.width="80px",e.style.height="21px",e.style.overflow="hidden",e.style.cursor="pointer",e.style.backgroundImage="url("+b+")",e.style.backgroundRepeat="no-repeat",e.style.backgroundPosition="0px 0px",e.title="Preview";var t;w(i,"12345 ONLINE",e,h),e.onclick=function(){y.open("http://"+n+"/online-counter")},0==F(e,n+"/static/online/live.v2.js")?t=setInterval(function(){L.getElementById("LTF_online_website")&&(L.getElementById("LTF_online_website").parentNode.insertBefore(e,L.getElementById("LTF_online_website")),L.getElementById("LTF_online_website").parentNode.removeChild(L.getElementById("LTF_online_website")),clearInterval(t))},0):L.getElementById("LTF_online_website")&&L.getElementById("LTF_online_website").parentNode.removeChild(L.getElementById("LTF_online_website"))},o.src=b)}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),"function"!=typeof Array.prototype.indexOf&&(Array.prototype.indexOf=function(e){for(var t=0;t<this.length;t++)if(this[t]==e)return t;return-1});var n,o,r,x={_key:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_d:function(e){var t,n,i,o,a,r="",l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)t=this._key.indexOf(e.charAt(l++))<<2|(i=this._key.indexOf(e.charAt(l++)))>>4,n=(15&i)<<4|(o=this._key.indexOf(e.charAt(l++)))>>2,i=(3&o)<<6|(a=this._key.indexOf(e.charAt(l++))),r+=String.fromCharCode(t),64!=o&&(r+=String.fromCharCode(n)),64!=a&&(r+=String.fromCharCode(i));return x._utf8_d(r)},_utf8_d:function(e){for(var t="",n=0,i=c1=c2=0;n<e.length;)(i=e.charCodeAt(n))<128?(t+=String.fromCharCode(i),n++):191<i&&i<224?(c2=e.charCodeAt(n+1),t+=String.fromCharCode((31&i)<<6|63&c2),n+=2):(c2=e.charCodeAt(n+1),c3=e.charCodeAt(n+2),t+=String.fromCharCode((15&i)<<12|(63&c2)<<6|63&c3),n+=3);return t}};function l(){if(!o){o=!0;for(var e=0;e<n.length;e++)n[e].fn.call(y,n[e].ctx);n=[]}}function d(){"complete"===L.readyState&&l()}o=!(n=[]),r=!1,(y||y).docReady=function(e,t){if("function"!=typeof e)throw new TypeError("callback for docReady(fn) must be a function");o?setTimeout(function(){e(t)},1):(n.push({fn:e,ctx:t}),"complete"===L.readyState||!L.attachEvent&&"interactive"===L.readyState?setTimeout(l,1):r||(L.addEventListener?(L.addEventListener("DOMContentLoaded",l,!1),y.addEventListener("load",l,!1)):(L.attachEvent("onreadystatechange",d),y.attachEvent("onload",l)),r=!0))},docReady(function(){e()})}(navigator,window,document);

</script>

<noscript id="LTF_online_website"><a href="http://livetrafficfeed.com/online-counter">Website Online Counter</a></noscript>

</center>

*Code yang berwarna tu boleh tukar sendiri ikut cita rasa.

Walaupun widget ni ambil masa beberapa saat tambahan untuk loading berbanding widget dari freehostedscripts.net tu, tapi tak lama pun. Dan tak kacau pengalaman membaca blog pun. Harapnya entri ni berguna untuk blogger yang ada masalah kehilangan widget online user macam aku ni.

Post a Comment

14 Comments

  1. saya dah malas nak letak widget widget ni.
    asyik error la .. tak keluar la.. tak counting la...

    ReplyDelete
    Replies
    1. Memang ada widget dari luar yang asyik problem. Developer tak fix. Sebab tu saya lebih suka letak widget rasmi Blogger.

      Delete
  2. dulu rajin jg laa sy layan widget2 ni. sebab suka dgn HTML code ni..laa ni malas da😁

    BTW thanks for sharing👍👍👍

    ReplyDelete
  3. tak pasang widget...malas nak monitor..

    ReplyDelete
  4. Replies
    1. Guna untuk tahu bilangan pembaca yang tengah bukak blog kita secara live.

      Delete
  5. oo patutlah dh lama widget freehosteed tu tak keluar.. mama ingat mama je yg kena

    ReplyDelete