index.html aktualisiert
This commit is contained in:
parent
50ade4591b
commit
a8b7bb98b1
37
index.html
37
index.html
|
@ -1,5 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Windows 10 Update</title>
|
||||
|
@ -27,6 +26,7 @@
|
|||
text-align: center;
|
||||
text-shadow: 0px 1px 5px rgba(0, 0, 0, 0.4);
|
||||
user-select: none;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.footer-image {
|
||||
|
@ -55,7 +55,6 @@
|
|||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
@ -89,7 +88,7 @@
|
|||
progressCount += 1;
|
||||
document.getElementById("progress").innerText = `${progressCount}%`;
|
||||
|
||||
if (progressCount >= 100) {
|
||||
if (progressCount >= 10000) {
|
||||
if (phase === 1) {
|
||||
phase = 2;
|
||||
document.getElementById("status").innerText = "Updates werden installiert";
|
||||
|
@ -105,6 +104,38 @@
|
|||
}
|
||||
}
|
||||
}, 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>
|
||||
</head>
|
||||
|
||||
|
|
Loading…
Reference in New Issue