mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fixes apps and metadata loading locally or remotely.
This commit is contained in:
parent
0f5a83b970
commit
22169d9458
3 changed files with 323 additions and 311 deletions
|
@ -34,7 +34,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
|
|||
"system/emote.js",
|
||||
"system/miniTablet.js",
|
||||
"system/audioMuteOverlay.js",
|
||||
"system/keyboardShortcuts/keyboardShortcuts.js",
|
||||
"system/keyboardShortcuts/keyboardShortcuts.js"
|
||||
];
|
||||
var DEFAULT_SCRIPTS_SEPARATE = [
|
||||
"system/controllers/controllerScripts.js",
|
||||
|
|
|
@ -11,8 +11,24 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script type="text/javascript" src="https://kasenvr.github.io/community-apps/applications/metadata.js"></script>
|
||||
<script>
|
||||
//Paths
|
||||
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||
var rootPath;
|
||||
var metadataScript = document.createElement("script");
|
||||
|
||||
if (currentPath.includes("kasenvr.github.io") || !currentPath.includes("file:/")) { // Loading app from repo or filesystem.
|
||||
rootPath = currentPath.replace("more/more.html", "applications/");
|
||||
metadataScript.src = "../applications/metadata.js";
|
||||
console.info("Loading apps and metadata locally.");
|
||||
} else {
|
||||
rootPath = "https://kasenvr.github.io/community-apps/applications/";
|
||||
metadataScript.src = "https://kasenvr.github.io/community-apps/applications/metadata.js";
|
||||
console.info("Loading apps and metadata remotely.");
|
||||
}
|
||||
|
||||
document.getElementsByTagName("head")[0].appendChild(metadataScript);
|
||||
|
||||
//Parameters
|
||||
function findGetParameter(parameterName) {
|
||||
var result = null,
|
||||
|
@ -45,10 +61,6 @@
|
|||
location.href = "more.html?offset=0";
|
||||
}
|
||||
|
||||
//Paths
|
||||
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||
var rootPath = "https://kasenvr.github.io/community-apps/applications/";
|
||||
|
||||
//Running scripts
|
||||
var buttonList = [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue