add windowgen
This commit is contained in:
parent
c2474346b4
commit
b02fc4ecae
3 changed files with 35 additions and 10 deletions
24
apps/windowgen.html
Normal file
24
apps/windowgen.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form">
|
||||||
|
<input id="url" type="url" placeholder="url">
|
||||||
|
<input id="titl" type="text" placeholder="title">
|
||||||
|
<input id="wid" type="number" placeholder="width">
|
||||||
|
<input id="hei" type="number" placeholder="height">
|
||||||
|
<input type="submit">
|
||||||
|
</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>
|
18
drag.js
18
drag.js
|
@ -133,12 +133,12 @@ function createWindow(url, title, width, height) {
|
||||||
document.body.appendChild(win);
|
document.body.appendChild(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* SUBWINDOW CREATE WINDOW */
|
||||||
<div class="window">
|
window.onmessage = function(e) {
|
||||||
<div class="header drag">
|
const dat = e.data.split("|");
|
||||||
<p>Slimekoban</p>
|
|
||||||
<button onclick="this.parentNode.parentNode.remove()">x</button>
|
console.log(dat)
|
||||||
</div>
|
if (dat[0] == "WIN") {
|
||||||
<iframe class="content" src="https://www.possiblyaxolotl.com" width="800px" height="500px"></iframe>
|
createWindow(dat[1],dat[2],dat[3]+"px",dat[4]+"px")
|
||||||
</div>
|
}
|
||||||
*/
|
}
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<link rel="stylesheet" href="style.css?v=1">
|
<link rel="stylesheet" href="style.css?v=1">
|
||||||
|
|
||||||
<script src="drag.js?v=1" defer></script>
|
<script src="drag.js?v=2" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
<button onclick="createWindow('https://ko-fi.com/possiblyaxolotl/?hidefeed=true&widget=true&embed=true&preview=true', 'donate', '400px', '630px')">support</button>
|
<button onclick="createWindow('https://ko-fi.com/possiblyaxolotl/?hidefeed=true&widget=true&embed=true&preview=true', 'donate', '400px', '630px')">support</button>
|
||||||
<button onclick="createWindow('apps/slimekoban.html', 'slimekoban', '450px', '350px')">slimekoban</button>
|
<button onclick="createWindow('apps/slimekoban.html', 'slimekoban', '450px', '350px')">slimekoban</button>
|
||||||
<button onclick="createWindow('apps/info.html', 'info', '200px', '120px')">info</button>
|
<button onclick="createWindow('apps/info.html', 'info', '200px', '120px')">info</button>
|
||||||
|
<button onclick="createWindow('apps/windowgen.html', 'windowgen', '180px', '130px')">windowgen</button>
|
||||||
|
|
||||||
<p><a href="https://directory.possiblyaxolotl.com">PossiblyAxolotl Directory</a></p>
|
<p><a href="https://directory.possiblyaxolotl.com">PossiblyAxolotl Directory</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue