41fd848fa0
Some HTML files were importing iframe_api.js automatically by detecting the referrer document. While this was done in a safe way (the map container does not use cookies), it is not a best practice to load a script originating from document.referrer. This PR solves the issue by using PHP to inject the correct domain name in the HTML files.
16 lines
463 B
JavaScript
16 lines
463 B
JavaScript
let menuIframeApi = undefined;
|
|
|
|
WA.ui.registerMenuCommand('custom callback menu', () => {
|
|
WA.nav.openTab("https://workadventu.re/");
|
|
})
|
|
|
|
WA.ui.registerMenuCommand('custom iframe menu', {iframe: 'customIframeMenu.html'});
|
|
|
|
WA.room.onEnterZone('iframeMenu', () => {
|
|
menuIframeApi = WA.ui.registerMenuCommand('IFRAME USE API', {iframe: 'customIframeMenuApi.php', allowApi: true});
|
|
})
|
|
|
|
WA.room.onLeaveZone('iframeMenu', () => {
|
|
menuIframeApi.remove();
|
|
})
|