i-eat.rocks/apps/windowgen.html
2024-08-16 00:08:05 -06:00

26 lines
No EOL
927 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="standard.css">
</head>
<body>
<form id="form">
<input id="url" type="url" placeholder="url" required>
<input id="titl" type="text" placeholder="title">
<input id="wid" type="number" placeholder="width" required>
<input id="hei" type="number" placeholder="height" required>
<button>submit</button>
</form>
<script>
document.getElementById("form").addEventListener("submit", event => {
event.preventDefault()
window.top.postMessage(`win ${document.getElementById("url").value} ${document.getElementById("titl").value} ${document.getElementById("wid").value} ${document.getElementById("hei").value}`)
})
</script>
</body>
</html>