document.resize = function(){
const adjust = Math.min(window.innerHeight, window.outerWidth)/400 - 0.05;
document.write('<html style="background: black;"><head style="background: black;">');
document.write('<html><head><style>');
document.write('#wrapper { width: 100%; height: 100%; padding: 0; overflow: hidden; }');
document.write(`#scaled-frame { width: ${window.outerWidth/1.55}px; height: ${400*adjust}px; border: 0px}`);
document.write('#scaled-frame {');
document.write(` zoom: scale(${adjust});`);
document.write(` -moz-transform: scale(${adjust});`);
document.write(' -moz-transform-origin: 0 0;');
document.write(` -o-transform: scale(${adjust});`);
document.write(' -o-transform-origin: 0 0;');
document.write(` -webkit-transform: scale(${adjust});`);
document.write(' -webkit-transform-origin: 0 0;');
document.write('}');
document.write('');
document.write('@media screen and (-webkit-min-device-pixel-ratio:0) {');
document.write(' #scaled-frame { zoom: 1; }');
document.write('}');
document.write('</style>');
document.write('');
document.write(`</head"><body><div id="wrapper"><iframe id="scaled-frame" src=${location.href}${location.href.indexOf("/embed") < 0 ? "/embed": ""}></iframe></div></body></html>`);
}
document.resize();
well it's what i use at least, it's not intended for applab use though so modification will be needed
Enjoy!