the settings page is janky and will be replaced at the bottom
This commit is contained in:
parent
f6f077ba4f
commit
0787325161
@ -1,30 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Page 1 - Color Controller</title>
|
||||
<script>
|
||||
let newWindow;
|
||||
|
||||
function openPage2() {
|
||||
newWindow = window.open('index.html', 'main');
|
||||
}
|
||||
|
||||
function changeWindowColor(color) {
|
||||
if (newWindow) {
|
||||
newWindow.postMessage(color, '*');
|
||||
} else {
|
||||
alert('Please open the main page first.');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Open and Control Background Color of Page 2</h1>
|
||||
<button onclick="openPage2()">Open Main Page</button><br><br>
|
||||
<button onclick="changeWindowColor('lightblue')">Light Blue</button>
|
||||
<button onclick="changeWindowColor('lightgreen')">Light Green</button>
|
||||
<button onclick="changeWindowColor('lightcoral')">Light Coral</button>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user