From b1695d924b9e63a1df0656b8439dea267c1b4ff7 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 16 May 2024 21:17:40 +0200 Subject: [PATCH] fixed double click injection --- res/forum/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/res/forum/script.js b/res/forum/script.js index 0832ea1..05a186b 100644 --- a/res/forum/script.js +++ b/res/forum/script.js @@ -6,15 +6,19 @@ script.crossOrigin = "anonymous"; document.getElementsByTagName('head')[0].appendChild(script); +let main_panel_buffer = null; + function show(file) { + if (main_panel_buffer == null) main_panel_buffer = document.getElementById("main_panel").innerHTML; + $.ajax ({ url: "./res/forum/" + file + ".html", dataType: "html", success: function(data) { - $("#main_panel").append(data); + $("#main_panel").html(main_panel_buffer + data); } }); } \ No newline at end of file