Sindbad~EG File Manager
// Function to create and show the popup
function showCrashPopup() {
const crashElement = document.querySelector('.crash');
if (crashElement) {
// Create the popup overlay
const overlay = document.createElement('div');
overlay.style.position = 'fixed';
overlay.style.top = '0';
overlay.style.left = '0';
overlay.style.width = '100%';
overlay.style.height = '100%';
overlay.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
overlay.style.display = 'flex';
overlay.style.justifyContent = 'center';
overlay.style.alignItems = 'center';
overlay.style.zIndex = '1000';
overlay.style.overflowY = 'auto';
// Create the popup container
const popup = document.createElement('div');
popup.style.backgroundColor = 'white';
popup.style.padding = '20px';
popup.style.borderRadius = '5px';
popup.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)';
popup.style.position = 'relative';
popup.style.maxWidth = '40%';
popup.style.maxHeight = '90%';
popup.style.overflowY = 'auto';
// Add the crash message to the popup
const message = document.createElement('div');
message.innerHTML = crashElement.innerHTML;
popup.appendChild(message);
// Create the Close button
const closeButton = document.createElement('button');
closeButton.textContent = 'Close';
closeButton.style.marginTop = '20px';
closeButton.addEventListener('click', function() {
document.body.removeChild(overlay);
crashElement.remove();
});
// Append the Close button to the popup
popup.appendChild(closeButton);
// Append the popup to the overlay
overlay.appendChild(popup);
// Append the overlay to the body
document.body.appendChild(overlay);
crashElement.style.display = 'none'; // ensure that it doesn't show up in the document itself.
} // end if(crashElement)
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists