2021-05-20 08:58:05 +02:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2021-07-20 19:54:45 +02:00
|
|
|
<script>
|
|
|
|
var script = document.createElement('script');
|
|
|
|
// Don't do this at home kids! The "document.referrer" part is actually inserting a XSS security.
|
|
|
|
// We are OK in this precise case because the HTML page is hosted on the "maps" domain that contains only static files.
|
|
|
|
script.setAttribute('src', document.referrer + 'iframe_api.js');
|
|
|
|
document.head.appendChild(script);
|
|
|
|
window.addEventListener('load', () => {
|
|
|
|
WA.ui.registerMenuCommand("test", () => {
|
|
|
|
WA.chat.sendChatMessage("test clicked", "menu cmd")
|
|
|
|
})
|
2021-06-23 09:18:20 +02:00
|
|
|
})
|
2021-05-20 08:58:05 +02:00
|
|
|
</script>
|
2021-07-20 19:54:45 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p>Add a custom menu</p>
|
2021-05-20 08:58:05 +02:00
|
|
|
</body>
|
|
|
|
</html>
|