i-eat.rocks/site/commands.js
2024-09-13 20:49:46 -06:00

17 lines
No EOL
537 B
JavaScript

window.onmessage = function(e) {
const dat = e.data.split(" ");
console.log(dat)
/* CREATE WINDOW */
if (dat[0] == "win") {
createWindow(dat[1],dat[2],dat[3]+"px",dat[4]+"px")
} else if (dat[0] == "rock") {
window.location.href='/favicon.ico';
} else if (dat[0] == "url") {
window.location.href = dat[1];
} else if (dat[0] == "urlt") {
window.open(dat[1]);
} else if (dat[0] == "wg") {
createWindow("/apps/windowgen.html", "WINDOWGEN™", "250px", "150px")
}
}