Files
WLED_MM_Infinity/wled00/data/liveviewws2D.htm
Frank 8680d13df4 some more cases of missing lang="en"
no, its not written in Danish ;-)
2026-02-19 13:45:00 +01:00

38 lines
987 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<meta charset="utf-8">
<meta name="theme-color" content="#222222">
<title>WLED Live Preview</title>
<script src="peek.js"></script> <!--WLEDMM-->
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<canvas id="canvasPeek"></canvas>
<script>
var c = document.getElementById('canvasPeek');
var throttled = false;
function setCanvas() {
c.width = window.innerWidth * 0.98; //remove scroll bars
c.height = window.innerHeight * 0.98; //remove scroll bars
}
setCanvas();
peek(c);
// window.resize event listener
window.addEventListener('resize', (e)=>{
if (!throttled) { // only run if we're not throttled
setCanvas(); // actual callback action
throttled = true; // we're throttled!
setTimeout(()=>{ // set a timeout to un-throttle
throttled = false;
}, 250);
}
});
</script>
</body>
</html>