From 2385a79ff81dfdcb82007a3fedeb9be19e630237 Mon Sep 17 00:00:00 2001 From: IM23a-spirgif Date: Mon, 19 May 2025 22:57:02 +0200 Subject: [PATCH] Update weapon data fetching and dropdown handling --- static/filterWeapons.js | 4 ++-- templates/calculator.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/filterWeapons.js b/static/filterWeapons.js index f18bafd..e6ffc86 100644 --- a/static/filterWeapons.js +++ b/static/filterWeapons.js @@ -9,7 +9,7 @@ let ignoreHeadshots = false; // Function to fetch operatives data from JSON function fetchOperativesData() { - fetch('/static/json/operative.json') + fetch('/trlstats/static/json/operative.json') .then(response => response.json()) .then(data => { populateOperatives(data.operatives); // Populate the operative dropdown once data is loaded @@ -573,7 +573,7 @@ form.addEventListener('submit', e => { mag_size: parseFloat(data.get('magazin')), reload_time: parseFloat(data.get('reload-time')), damage_multiplier: parseFloat(data.get('multiplier')), - guntype: data.get('gun-type') ? [data.get('gun-type')] : [] + guntype: data.getAll('gun-type') }; // 2) Add it local diff --git a/templates/calculator.html b/templates/calculator.html index 603b093..a63f372 100644 --- a/templates/calculator.html +++ b/templates/calculator.html @@ -71,9 +71,9 @@
- - +