Removed Unnecessary Comments

This commit is contained in:
IM23a-spirgif
2025-06-15 22:54:46 +02:00
parent d5ca84e9a3
commit 2947f92802
3 changed files with 123 additions and 204 deletions
+2 -4
View File
@@ -1,5 +1,5 @@
document.addEventListener('DOMContentLoaded', () => {
fetch('/trlstats/static/json/data.json') // Fetch the JSON file directly
fetch('/trlstats/static/json/data.json')
.then(response => response.json())
.then(data => {
const updatedGuns = data.map(gun => {
@@ -10,8 +10,6 @@ document.addEventListener('DOMContentLoaded', () => {
const reload_time_min = gun['reload_time'] / 60;
const dpm = (gun['mag_size'] * total_damage) / (reload_time_min + (gun['mag_size'] / gun['rpm']));
const avg_dps = dpm / 60;
// Add the calculated stats to the gun object
return {
...gun,
total_damage: total_damage,
@@ -28,7 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
function populateTable(data) {
const table = document.getElementById('gun-stats').getElementsByTagName('tbody')[0];
table.innerHTML = ''; // Clear existing table data
table.innerHTML = '';
data.forEach(gun => {
const row = table.insertRow();
row.insertCell(0).innerText = gun.name;