diff --git a/scripts/communityScripts/explore/explore.html b/scripts/communityScripts/explore/explore.html index affaf0887f..6914b062c9 100644 --- a/scripts/communityScripts/explore/explore.html +++ b/scripts/communityScripts/explore/explore.html @@ -73,6 +73,9 @@ <body onload="retrieveAddressList()"> <h3>Explore</h3> + <button class="myButton" onclick="navigateBack()">< Back</button> + <button class="myButton" onclick="navigateHome()">Home</button> + <button class="myButton" onclick="navigateForward()">Forward ></button> <input type="text" id="domainAddressInput" placeholder="Type domain address here"> @@ -85,15 +88,36 @@ <script> function myDomainAddressInputGoTo() { - var hifiUrl = document.getElementById("domainAddressInput").value; - if (hifiUrl != "") { + var vircadiaUrl = document.getElementById("domainAddressInput").value; + if (vircadiaUrl !== "") { var readyEvent = { "action": "goToUrl", - "visit": hifiUrl, + "visit": vircadiaUrl, }; EventBridge.emitWebEvent(JSON.stringify(readyEvent)); } } + + function navigateBack() { + var readyEvent = { + "action": "navigateBack" + } + EventBridge.emitWebEvent(JSON.stringify(readyEvent)); + } + + function navigateHome() { + var readyEvent = { + "action": "navigateHome" + } + EventBridge.emitWebEvent(JSON.stringify(readyEvent)); + } + + function navigateForward() { + var readyEvent = { + "action": "navigateForward" + } + EventBridge.emitWebEvent(JSON.stringify(readyEvent)); + } function navigateTo(url) { var readyEvent = { diff --git a/scripts/communityScripts/explore/explore.js b/scripts/communityScripts/explore/explore.js index ac1de51521..74158580ec 100644 --- a/scripts/communityScripts/explore/explore.js +++ b/scripts/communityScripts/explore/explore.js @@ -48,7 +48,7 @@ function onWebEventReceived(event) { messageData = JSON.parse(event); - if (messageData.action == "requestAddressList") { + if (messageData.action === "requestAddressList") { goToAddresses = Settings.getValue("goToDecentral", ""); for (var i = 0; i < goToAddresses.length; i++) { @@ -80,14 +80,27 @@ tablet.emitScriptEvent(JSON.stringify(readyEvent)); - } else if (messageData.action == "goToUrl") { + } else if (messageData.action === "goToUrl") { Window.location = messageData.visit; - } else if (messageData.action == "addLocation") { + } else if (messageData.action === "navigateBack") { + location.goBack(); + } else if (messageData.action === "navigateHome") { + if (LocationBookmarks.getHomeLocationAddress()) { + location.handleLookupString(LocationBookmarks.getHomeLocationAddress()); + } else { + location.goToLocalSandbox(); + } + } else if (messageData.action === "navigateForward") { + location.goForward(); + } else if (messageData.action === "addLocation") { var locationBoxUserData = { owner: messageData.owner, domainName: messageData.domainName, port: messageData.Port, + ipAddress: null, + avatarCountRadius: null, + customPath: null, grabbableKey: { grabbable: false } @@ -105,7 +118,7 @@ collisionless: true, grabbable: false }); - } else if (messageData.action == "retrievePortInformation") { + } else if (messageData.action === "retrievePortInformation") { var readyEvent = { "action": "retrievePortInformationResponse", "goToAddresses": goToAddresses diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index 1eac2ae0aa..5e7e120bf3 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -23,7 +23,6 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/pal.js", // "system/mod.js", // older UX, if you prefer "system/avatarapp.js", "system/makeUserConnection.js", - "system/tablet-goto.js", "system/marketplaces/marketplaces.js", "system/notifications.js", "system/commerce/wallet.js", @@ -41,7 +40,7 @@ var DEFAULT_SCRIPTS_SEPARATE = [ "system/controllers/controllerScripts.js", "communityModules/notificationCore/notificationCore.js", "simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js", - {"stable": "system/more/app-more.js", "beta": "https://kasenvr.github.io/community-apps/more/app-more.js"}, + {"stable": "system/more/app-more.js", "beta": "https://cdn.vircadia.com/community-apps/more/app-more.js"}, {"stable": "communityScripts/explore/explore.js", "beta": "https://metaverse.vircadia.com/interim/d-goto/app/explore.js"}, {"stable": "communityModules/chat/FloofChat.js", "beta": "https://content.fluffy.ws/scripts/chat/FloofChat.js"} //"system/chat.js"