Skip to content

Commit

Permalink
Fixes TGUI not loading for newer 515 builds (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
Veiyna authored Apr 18, 2024
1 parent 955f638 commit e2c8c1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tgui/public/tgui.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
// Basic checks to detect whether this page runs in BYOND
var isByond = tridentVersion !== null
&& 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;
Expand Down Expand Up @@ -194,6 +195,8 @@
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;
}
Expand Down

0 comments on commit e2c8c1d

Please sign in to comment.