vbnnmm
<script>
async function updateTotal() {
try {
const res = await fetch("https://script.google.com/macros/s/xxxxxxxxxxxxxxxxxx/exec"); // Google Apps Script URL
let count = await res.text();
count = parseInt(count, 10);
if(isNaN(count)) count = 0;
document.getElementById('totalviews').innerText =
count >= 1000 ? (count / 1000).toFixed(1) + 'k' : count.toLocaleString();
} catch(e) {
console.error(e);
document.getElementById('totalviews').innerText = "Error";
}
}
updateTotal();
setInterval(updateTotal, 30000);
</script>
0
0
0
Loading...
