chore: fixes

This commit is contained in:
MattTheTekie 2026-04-24 11:48:12 -04:00
commit e3b292a755
2 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,26 @@
const VISITOR_COUNTER = document.getElementById("visitorCounter");
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
// Get the data
let site_data = JSON.parse(this.responseText);
// Add commas
let num_arr = site_data.info.views.toString().split("");
let num_str = "";
for (i = 0; i < num_arr.length; i++) {
num_str += num_arr[i];
if ((num_arr.length - 1 - i) % 3 == 0 && num_arr.length - 1 - i != 0) {
num_str += ",";
}
}
// Add result to html
VISITOR_COUNTER.innerHTML = num_str;
}
};
xhttp.open(
"GET",
"http://www.veltron.net/counter.php?sitename=venith",
true
);
xhttp.send();

View file

@ -93,7 +93,7 @@
</div>
<script src="javascript/view-counter.js"></script>
<script src="javascript/view-counter-legacy.js"></script>
<!-- PAGE SYSTEM -->
<script>