added example script for map exit

This commit is contained in:
jonny 2021-04-29 10:43:51 +02:00
parent 006195e8cc
commit 8f6c65384a

View File

@ -1,6 +1,8 @@
/// <reference path="../../front/src/iframe_api.ts" />
var zoneName = "popUpGoToPageZone"; var zoneName = "popUpGoToPageZone";
var urlPricing = "https://workadventu.re/pricing"; var urlPricing = "https://workadventu.re/pricing";
var urlGettingStarted = "https://workadventu.re/getting-started"; var urlGettingStarted = "https://workadventu.re/getting-started";
var urlRelativeMap = "script_api.json";
var isCoWebSiteOpened = false; var isCoWebSiteOpened = false;
WA.onChatMessage((message => { WA.onChatMessage((message => {
@ -24,8 +26,7 @@ WA.onEnterZone(zoneName, () => {
popup.close(); popup.close();
}) })
} },
,
{ {
label: "openCoWebSite", className: "popUpElement", label: "openCoWebSite", className: "popUpElement",
callback: (popup => { callback: (popup => {
@ -34,6 +35,14 @@ WA.onEnterZone(zoneName, () => {
popup.close(); popup.close();
}) })
}, {
label: "load grouped map",
className: "popUpElement",
callback: (popup => {
WA.loadPage(urlRelativeMap);
popup.close();
})
}]); }]);
}) })