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