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

Commit fd7dad0

Browse files
Revert "."
This reverts commit 9ceeff9.
1 parent 9ceeff9 commit fd7dad0

File tree

4 files changed

+703
-582
lines changed

4 files changed

+703
-582
lines changed

code/modules/client/client_procs.dm

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ 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-
239237
// Instantiate tgui panel
240238
tgui_panel = new(src, "browseroutput")
241239

@@ -339,11 +337,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
339337
if(SSinput.initialized)
340338
set_macros()
341339

342-
stat_panel.Initialize(inline_html = file("html/statbrowser.html"))
343-
addtimer(CALLBACK(src, PROC_REF(check_panel_loaded)), 5 SECONDS)
344-
345340
// Initialize tgui panel
346341
tgui_panel.Initialize()
342+
src << browse(file('html/statbrowser.html'), "window=statbrowser")
343+
addtimer(CALLBACK(src, PROC_REF(check_panel_loaded)), 5 SECONDS)
344+
347345

348346
if(alert_mob_dupe_login)
349347
spawn()

code/modules/tgui/tgui_window.dm

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@
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 = "",
62-
)
57+
fancy = FALSE,
58+
assets = list(),
59+
inline_html = "",
60+
inline_js = "",
61+
inline_css = "")
6362
log_tgui(client,
6463
context = "[id]/initialize",
6564
window = src)

html/statbrowser.html

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

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

10711075
function create_debug(){
10721076
if(!document.getElementById("Debug Stat Panel")) {

0 commit comments

Comments
 (0)