Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 9ceeff9

Browse files
.
1 parent 63ace78 commit 9ceeff9

File tree

4 files changed

+582
-703
lines changed

4 files changed

+582
-703
lines changed

code/modules/client/client_procs.dm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
234234
if(byond_version >= 516)
235235
winset(src, null, list("browser-options" = "find,refresh,byondstorage"))
236236

237+
stat_panel = new(src, "statbrowser")
238+
237239
// Instantiate tgui panel
238240
tgui_panel = new(src, "browseroutput")
239241

@@ -337,11 +339,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
337339
if(SSinput.initialized)
338340
set_macros()
339341

340-
// Initialize tgui panel
341-
tgui_panel.Initialize()
342-
src << browse(file('html/statbrowser.html'), "window=statbrowser")
342+
stat_panel.Initialize(inline_html = file("html/statbrowser.html"))
343343
addtimer(CALLBACK(src, PROC_REF(check_panel_loaded)), 5 SECONDS)
344344

345+
// Initialize tgui panel
346+
tgui_panel.Initialize()
345347

346348
if(alert_mob_dupe_login)
347349
spawn()

code/modules/tgui/tgui_window.dm

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@
5454
* optional fancy bool If TRUE, will hide the window titlebar.
5555
*/
5656
/datum/tgui_window/proc/Initialize(
57-
fancy = FALSE,
58-
assets = list(),
59-
inline_html = "",
60-
inline_js = "",
61-
inline_css = "")
57+
fancy = FALSE,
58+
assets = list(),
59+
inline_html = "",
60+
inline_js = "",
61+
inline_css = "",
62+
)
6263
log_tgui(client,
6364
context = "[id]/initialize",
6465
window = src)

html/statbrowser.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,12 +1065,8 @@
10651065
}
10661066

10671067
window.onload = function() {
1068-
NotifyByondOnload();
1069-
};
1070-
1071-
function NotifyByondOnload() {
1072-
window.location.href = "byond://winset?command=Panel-Ready";
1073-
}
1068+
Byond.sendMessage("Panel-Ready");
1069+
};
10741070

10751071
function create_debug(){
10761072
if(!document.getElementById("Debug Stat Panel")) {

0 commit comments

Comments
 (0)