13 lines
571 B
HTML
13 lines
571 B
HTML
<script>
|
|
window.onload = function() {
|
|
// counter
|
|
{{ $enableBusuanzi := .Site.Params.enableBusuanzi }}
|
|
var enableBusuanzi = JSON.parse({{ $enableBusuanzi | jsonify }});
|
|
if (enableBusuanzi) {
|
|
var sitePvElem = document.querySelector('#busuanzi_value_site_pv');
|
|
var siteUvElem = document.querySelector('#busuanzi_value_site_uv');
|
|
sitePvElem.textContent = sitePvElem.textContent.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
|
|
siteUvElem.textContent = siteUvElem.textContent.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
|
|
}
|
|
}
|
|
</script> |