FULLSCREEN CODE:
<html><head><base target="_blank"></head><body><button class="c-button">FULLSCREEN</button>
<style>
.c-button {
min-width: 100%;
font-family:.Fantasy;
appearance: none;
border: 0;
border-color: #fff;
border-radius: 5px;
background: #000000;
color: #fff;
padding: 0px 46px;
font-size: 20px;
cursor: pointer;
}
.c-button:hover {
background: #add8e6;
}
.c-button:focus {
outline: none;
box-shadow: 0 0 0 4px #cbd6ee;
}
.c-button {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style>
<script>
var urlObj = new window.URL(window.location.href);
var url = "insert_ur_game_url_here";
if (url) {
var win;
document.querySelector('button').onclick = function() {
if (win) {
win.focus();
} else {
win = window.open();
win.document.body.style.margin = '0';
win.document.body.style.height = '100vh';
var iframe = win.document.createElement('iframe');
iframe.style.border = 'none';
iframe.style.width = '100%';
iframe.style.height = '100%';
iframe.style.margin = '0';
iframe.src = url;
win.document.body.appendChild(iframe);
var interval = setInterval(function() {
if (win.closed) {
clearInterval(interval);
win = undefined;
}
}, 500);
}
};
}
</script></body></html>