From 106be0e2b20607f27af8c15e78f1fe9d9aa494e4 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 16 Nov 2024 12:01:58 +0100 Subject: [PATCH] dynamic map list --- public/js/maps.js | 21 +++++++++++++++++++++ views/manage.ejs | 22 ++++++---------------- 2 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 public/js/maps.js diff --git a/public/js/maps.js b/public/js/maps.js new file mode 100644 index 0000000..ef2a984 --- /dev/null +++ b/public/js/maps.js @@ -0,0 +1,21 @@ +$(document).ready(function () { + var map_list = []; + + function update_maps() { + map_list = []; + map_list.push("cs_italy"); + map_list.push("cs_office"); + map_list.push("de_ancient"); + map_list.push("de_anubis"); + map_list.push("de_assembly"); + map_list.push("de_dust2"); + map_list.push("de_inferno"); + map_list.push("de_memento"); + map_list.push("de_mills"); + map_list.push("de_mirage"); + map_list.push("de_nuke"); + map_list.push("de_overpass"); + map_list.push("de_thera"); + map_list.push("de_vertigo"); + } +}); diff --git a/views/manage.ejs b/views/manage.ejs index 35ae3a4..7241f53 100644 --- a/views/manage.ejs +++ b/views/manage.ejs @@ -96,7 +96,7 @@
- @@ -106,21 +106,10 @@
- + <% for (var i = 0; i < map_list.length; i++) { %> + + <% } %>
@@ -273,6 +262,7 @@ +