embed the base url config directly into the inline js on index.html

This commit is contained in:
Greg Gauthier 2024-07-01 16:56:43 +01:00
parent b63cc810d7
commit c2b8364b6d

View File

@ -29,8 +29,16 @@
<hr/>
<div id="toolPanel"></div>
<script src="config.js"></script>
<script>
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
window.BASE_URL = 'http://127.0.0.1:5000';
} else {
window.BASE_URL = 'https://gammaworld.gmgauthier.com';
}
console.log(window.location.hostname)
console.log(window.BASE_URL)
document.addEventListener('DOMContentLoaded', function () {
loadContent("intro.html");