From 74eefac999d10a6824b3852da46ed9909b629545 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 8 May 2023 21:43:35 -0400 Subject: [PATCH] Places app: support for file URI scheme This PR adds the support of URI starting by "file:/" in the places app. (to allow to load local serverless json) --- scripts/system/places/places.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/system/places/places.html b/scripts/system/places/places.html index 5ac0357c1c..e7213fd617 100644 --- a/scripts/system/places/places.html +++ b/scripts/system/places/places.html @@ -502,7 +502,7 @@ "channel": channel, "action": "GO_FORWARD" }; - EventBridge.emitWebEvent(JSON.stringify(message)); + EventBridge.emitWebEvent(JSON.stringify(message)); } function pinMetaverse(metaverseIndex, pinned) { @@ -671,7 +671,8 @@ function teleportUsingAddressBarValue(url) { var finalizedUrl = url; - if (url.substr(0, 7).toLocaleLowerCase() !== "http://" && + if (url.substr(0, 6).toLocaleLowerCase() !== "file:/" && + url.substr(0, 7).toLocaleLowerCase() !== "http://" && url.substr(0, 8).toLocaleLowerCase() !== "https://" && url.substr(0, 7).toLocaleLowerCase() !== "hifi://") { finalizedUrl = "hifi://" + url;