Is it possible to export a game as an HTML5 version in such a way that the following script is not automatically added to the index.html, so that you don't have to remove it manually afterwards?
<script> if (location.protocol.substr(0, 4) === "file") { alert("Web exports won't work until you upload them. (When running on the file: protocol, browsers block many features from working for security reasons.)"); } </script>
Thanks in advance!
Develop games in your browser. Powerful, performant & highly capable.
Removing that warning doesn't mean the project will work on file:// - it still won't work.
If you want to export a project that works locally, use a desktop export option like Windows WebView2.
Ashley Yes, of course I understand that. I just don't want the project to run locally.
I use an SDK that unfortunately complains if any JS code is called before it is initialized. And that is exactly the snippet that causes this issue. Therefore has to be removed manually.