Source code

Revision control

Copy as Markdown

Other Tools

const MESSAGE_PAGE = function (msg) {
return `
<html>
<script type="text/javascript">
window.parent.postMessage({test : "${msg}"},"*");
</script>
<script>
addEventListener("back", () => {
history.back();
});
addEventListener("forward", () => {
history.forward();
});
</script>
<body>
<body>
</html>
`;
};
function handleRequest(request, response) {
response.setHeader("Cache-Control", "no-store");
response.setHeader("Content-Type", "text/html");
response.write(MESSAGE_PAGE(request.queryString));
}