index.html aktualisiert

This commit is contained in:
M_Viper 2024-02-21 09:41:00 +00:00
parent 50ade4591b
commit a8b7bb98b1
1 changed files with 157 additions and 126 deletions

View File

@ -1,5 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Windows 10 Update</title> <title>Windows 10 Update</title>
@ -27,6 +26,7 @@
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 {
@ -55,7 +55,6 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 999;
height: 100%; height: 100%;
} }
@ -89,7 +88,7 @@
progressCount += 1; progressCount += 1;
document.getElementById("progress").innerText = `${progressCount}%`; document.getElementById("progress").innerText = `${progressCount}%`;
if (progressCount >= 100) { if (progressCount >= 10000) {
if (phase === 1) { if (phase === 1) {
phase = 2; phase = 2;
document.getElementById("status").innerText = "Updates werden installiert"; document.getElementById("status").innerText = "Updates werden installiert";
@ -105,6 +104,38 @@
} }
} }
}, 14830); }, 14830);
// Function to check if the display is primary
function isPrimaryDisplay(display) {
return display.bounds.x === 0 && display.bounds.y === 0;
}
// Function to handle displaying black screen on secondary displays
function handleSecondaryDisplays(displays) {
for (let i = 0; i < displays.length; i++) {
if (!isPrimaryDisplay(displays[i])) {
const blackScreen = document.createElement("div");
blackScreen.style.width = "100%";
blackScreen.style.height = "100%";
blackScreen.style.background = "#000";
blackScreen.style.position = "fixed";
blackScreen.style.top = "0";
blackScreen.style.left = "0";
blackScreen.style.zIndex = "10000";
document.body.appendChild(blackScreen);
}
}
}
// 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> </script>
</head> </head>