16 lines
712 B
HTML
16 lines
712 B
HTML
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
|
|
<script defer src="{{ $lazysizes.RelPermalink }}"></script>
|
|
|
|
<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> |