tgui update
This commit is contained in:
BongaTheProto
2024-03-13 16:13:00 -05:00
parent 70fab829ae
commit 29b862c2e2
4 changed files with 17 additions and 3 deletions

View File

@@ -48,8 +48,9 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') {
// Basic checks to detect whether this page runs in BYOND
var isByond = (tridentVersion !== null || window.cef_to_byond)
&& location.hostname === '127.0.0.1'
&& location.pathname.indexOf('/tmp') === 0
&& location.search !== '?external';
//As of BYOND 515 the path doesn't seem to include tmp dir anymore if you're trying to open tgui in external browser and looking why it doesn't work
//&& location.pathname.indexOf('/tmp') === 0
// Version constants
Byond.IS_BYOND = isByond;
@@ -202,6 +203,8 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') {
var len = styleSheets.length;
for (var i = 0; i < len; i++) {
var styleSheet = styleSheets[i];
if(styleSheet.href === undefined)
continue;
if (styleSheet.href.indexOf(url) !== -1) {
return styleSheet.rules.length > 0;
}