Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => JavaScript development => Topic started by: SteelRat on April 19, 2015, 01:20:01 pm

Title: Outerra UI
Post by: SteelRat on April 19, 2015, 01:20:01 pm
Hi cameni !

Code: [Select]
<!DOCTYPE html>
<html>
<head>
<title>Desktop sample</title>

<!-- File not loaded  -->
<script type="text/javascript" src="file:///ptm/js/myJavaScript.js"></script>

<!-- File loaded  -->
<script type="text/javascript" src="file:///www/js/myJavaScript.js"></script>

</head>
<body></body>
</html>

This can be circumvented without editing the contents of the folder "www"?
Title: Re: Outerra UI
Post by: cameni on April 20, 2015, 12:39:36 am
I think absolute paths in script tags are constrained to the www folder at the moment. It's a bit messy; ideally we would want to have UI addons located in data directory, but current Chromium version doesn't allow that.
Title: Re: Outerra UI
Post by: SteelRat on April 20, 2015, 08:51:02 am
Yes, it's my mistake.

If my call in console
Code: [Select]
window.open("../ptm/ui/desktop_console.html")
And call JScript in desktop_console.html
Code: [Select]
<script type="text/javascript" src="../js/myJavaScript.js"></script>File loaded.

Thank cameni !