[MIRROR] split tgui html (#10594)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-04-06 09:39:15 -07:00
committed by GitHub
parent 5383e18a48
commit dd0ab1d10c
29 changed files with 1106 additions and 789 deletions

View File

@@ -26,6 +26,17 @@ SUBSYSTEM_DEF(tgui)
/datum/controller/subsystem/tgui/PreInit()
basehtml = file2text('tgui/public/tgui.html')
// Inject inline helper functions
var/helpers = file2text('tgui/public/helpers.min.js')
helpers = "<script type='text/javascript'>\n[helpers]\n</script>"
basehtml = replacetextEx(basehtml, "<!-- tgui:helpers -->", helpers)
// Inject inline ntos-error styles
var/ntos_error = file2text('tgui/public/ntos-error.min.css')
ntos_error = "<style type='text/css'>\n[ntos_error]\n</style>"
basehtml = replacetextEx(basehtml, "<!-- tgui:ntos-error -->", ntos_error)
basehtml = replacetextEx(basehtml, "<!-- tgui:nt-copyright -->", "Nanotrasen (c) 2284-[CURRENT_STATION_YEAR]")
/datum/controller/subsystem/tgui/Shutdown()