i-eat.rocks/apps/windowgen.html

26 lines
927 B
HTML
Raw Normal View History

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