index.html aktualisiert
This commit is contained in:
parent
50ade4591b
commit
a8b7bb98b1
283
index.html
283
index.html
|
@ -1,126 +1,157 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
<html>
|
<head>
|
||||||
<head>
|
<title>Windows 10 Update</title>
|
||||||
<title>Windows 10 Update</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<style>
|
||||||
<style>
|
body {
|
||||||
body {
|
background: url('./images/win10_background.jpg') #0078D7 no-repeat center center fixed;
|
||||||
background: url('./images/win10_background.jpg') #0078D7 no-repeat center center fixed;
|
background-size: cover;
|
||||||
background-size: cover;
|
overflow: hidden;
|
||||||
overflow: hidden;
|
margin: 0;
|
||||||
margin: 0;
|
padding: 0;
|
||||||
padding: 0;
|
cursor: url('./images/cursor.png'), auto;
|
||||||
cursor: url('./images/cursor.png'), auto;
|
}
|
||||||
}
|
|
||||||
|
.progress-container {
|
||||||
.progress-container {
|
position: absolute;
|
||||||
position: absolute;
|
top: 50%;
|
||||||
top: 50%;
|
left: 50%;
|
||||||
left: 50%;
|
transform: translate(-50%, -50%);
|
||||||
transform: translate(-50%, -50%);
|
width: 500px;
|
||||||
width: 500px;
|
font-family: "Segoe UI", Arial;
|
||||||
font-family: "Segoe UI", Arial;
|
font-size: 23px;
|
||||||
font-size: 23px;
|
color: #fff;
|
||||||
color: #fff;
|
text-align: center;
|
||||||
text-align: center;
|
text-shadow: 0px 1px 5px rgba(0, 0, 0, 0.4);
|
||||||
text-shadow: 0px 1px 5px rgba(0, 0, 0, 0.4);
|
user-select: none;
|
||||||
user-select: none;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-image {
|
.footer-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 17px;
|
bottom: 17px;
|
||||||
left: 44.5%;
|
left: 44.5%;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-box {
|
.message-box {
|
||||||
display: block;
|
display: block;
|
||||||
color: #67A2E6;
|
color: #67A2E6;
|
||||||
font-family: "Segoe UI", Arial;
|
font-family: "Segoe UI", Arial;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen-image {
|
.fullscreen-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 999;
|
height: 100%;
|
||||||
height: 100%;
|
}
|
||||||
}
|
|
||||||
|
#loading-gif {
|
||||||
#loading-gif {
|
position: absolute;
|
||||||
position: absolute;
|
top: -100%;
|
||||||
top: -100%;
|
left: 50%;
|
||||||
left: 50%;
|
transform: translateX(-50%);
|
||||||
transform: translateX(-50%);
|
}
|
||||||
}
|
</style>
|
||||||
</style>
|
|
||||||
|
<script>
|
||||||
<script>
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
const element = document.documentElement;
|
||||||
const element = document.documentElement;
|
|
||||||
|
if (element.requestFullscreen) {
|
||||||
if (element.requestFullscreen) {
|
element.requestFullscreen();
|
||||||
element.requestFullscreen();
|
} else if (element.webkitRequestFullscreen) { /* Safari */
|
||||||
} else if (element.webkitRequestFullscreen) { /* Safari */
|
element.webkitRequestFullscreen();
|
||||||
element.webkitRequestFullscreen();
|
} else if (element.msRequestFullscreen) { /* IE11 */
|
||||||
} else if (element.msRequestFullscreen) { /* IE11 */
|
element.msRequestFullscreen();
|
||||||
element.msRequestFullscreen();
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
let progressCount = 0;
|
||||||
let progressCount = 0;
|
let phase = 1;
|
||||||
let phase = 1;
|
|
||||||
|
const updateInterval = setInterval(() => {
|
||||||
const updateInterval = setInterval(() => {
|
document.getElementById("advice").innerText = "Bitte schalten Sie Ihren Computer nicht aus.";
|
||||||
document.getElementById("advice").innerText = "Bitte schalten Sie Ihren Computer nicht aus.";
|
|
||||||
|
progressCount += 1;
|
||||||
progressCount += 1;
|
document.getElementById("progress").innerText = `${progressCount}%`;
|
||||||
document.getElementById("progress").innerText = `${progressCount}%`;
|
|
||||||
|
if (progressCount >= 10000) {
|
||||||
if (progressCount >= 100) {
|
if (phase === 1) {
|
||||||
if (phase === 1) {
|
phase = 2;
|
||||||
phase = 2;
|
document.getElementById("status").innerText = "Updates werden installiert";
|
||||||
document.getElementById("status").innerText = "Updates werden installiert";
|
progressCount = 0;
|
||||||
progressCount = 0;
|
} else if (phase === 2) {
|
||||||
} else if (phase === 2) {
|
clearInterval(updateInterval);
|
||||||
clearInterval(updateInterval);
|
document.getElementById("progress").innerText = "";
|
||||||
document.getElementById("progress").innerText = "";
|
document.getElementById("status").style.display = "none";
|
||||||
document.getElementById("status").style.display = "none";
|
document.getElementById("progress").style.display = "none";
|
||||||
document.getElementById("progress").style.display = "none";
|
setTimeout(() => {
|
||||||
setTimeout(() => {
|
document.getElementById("bluescreen").style.display = "block";
|
||||||
document.getElementById("bluescreen").style.display = "block";
|
}, 1000);
|
||||||
}, 1000);
|
}
|
||||||
}
|
}
|
||||||
}
|
}, 14830);
|
||||||
}, 14830);
|
|
||||||
</script>
|
// Function to check if the display is primary
|
||||||
</head>
|
function isPrimaryDisplay(display) {
|
||||||
|
return display.bounds.x === 0 && display.bounds.y === 0;
|
||||||
<body>
|
}
|
||||||
<div style="display: block; position: absolute; min-width: 100%; min-height: 100%; margin: 0; padding: 0;">
|
|
||||||
<div class="progress-container">
|
// Function to handle displaying black screen on secondary displays
|
||||||
<img id="loading-gif" src="./images/win10_loading.gif" draggable="false" ondragstart="return false;">
|
function handleSecondaryDisplays(displays) {
|
||||||
<a id="status">Updates werden verarbeitet</a><br>
|
for (let i = 0; i < displays.length; i++) {
|
||||||
<a id="progress">0%</a> <span>abgeschlossen.</span><br>
|
if (!isPrimaryDisplay(displays[i])) {
|
||||||
<a id="advice">Bitte schalten Sie Ihren Computer nicht aus.</a><br>
|
const blackScreen = document.createElement("div");
|
||||||
</div>
|
blackScreen.style.width = "100%";
|
||||||
<div class="footer-image">
|
blackScreen.style.height = "100%";
|
||||||
</div>
|
blackScreen.style.background = "#000";
|
||||||
</div>
|
blackScreen.style.position = "fixed";
|
||||||
|
blackScreen.style.top = "0";
|
||||||
<div class="hidden" id="blackscreen"><img class="fullscreen-image" src="./images/blackscreen.png"></div><br>
|
blackScreen.style.left = "0";
|
||||||
<div class="hidden" id="bluescreen"><img class="fullscreen-image" src="./images/win10_bluescreen.png"></div><br>
|
blackScreen.style.zIndex = "10000";
|
||||||
</body>
|
document.body.appendChild(blackScreen);
|
||||||
</html>
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the screen information
|
||||||
|
window.addEventListener('DOMContentLoaded', (event) => {
|
||||||
|
const electron = require('electron');
|
||||||
|
const remote = electron.remote;
|
||||||
|
const screen = remote.screen;
|
||||||
|
|
||||||
|
const displays = screen.getAllDisplays();
|
||||||
|
handleSecondaryDisplays(displays);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div style="display: block; position: absolute; min-width: 100%; min-height: 100%; margin: 0; padding: 0;">
|
||||||
|
<div class="progress-container">
|
||||||
|
<img id="loading-gif" src="./images/win10_loading.gif" draggable="false" ondragstart="return false;">
|
||||||
|
<a id="status">Updates werden verarbeitet</a><br>
|
||||||
|
<a id="progress">0%</a> <span>abgeschlossen.</span><br>
|
||||||
|
<a id="advice">Bitte schalten Sie Ihren Computer nicht aus.</a><br>
|
||||||
|
</div>
|
||||||
|
<div class="footer-image">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hidden" id="blackscreen"><img class="fullscreen-image" src="./images/blackscreen.png"></div><br>
|
||||||
|
<div class="hidden" id="bluescreen"><img class="fullscreen-image" src="./images/win10_bluescreen.png"></div><br>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue