Revert "Reverted back to 4cd4110 before changes were made to monitoring. Trying"

This reverts commit 495bda967f487a8e3ea040b4dc057fe6ca9817ae.

push

push
This commit is contained in:
dwebmm 2025-01-21 02:33:16 -06:00
parent 97f3a78f9d
commit 92628b6dc5
2 changed files with 11 additions and 45 deletions

View file

@ -191,17 +191,6 @@
</div>
</div>
<div id="blockedModal" class="modal blocked-modal">
<div class="modal-content">
<h2>⚠️ Content Blocked</h2>
<p>This content cannot be displayed due to security restrictions.</p>
<div class="blocked-modal-buttons">
<button id="blockedRetryBtn" class="blocked-retry-btn">Try Another Site</button>
<button id="blockedOpenBtn" class="blocked-open-btn">Open in New Tab</button>
</div>
</div>
</div>
<main>
<iframe
id="contentFrame"
@ -267,6 +256,7 @@
// Wait for the page to load then focus
frame.onload = () => {
// Check if we landed on a blocked/error page
try {
// Get the actual URL from the iframe
const currentUrl = frame.contentWindow.location.href;
@ -317,6 +307,7 @@
title.includes("cannot") ||
title.includes("denied")
) {
<<<<<<< HEAD
<<<<<<< HEAD
fumble();
return;
@ -365,27 +356,14 @@
blockedModal.classList.remove('show');
fumble();
};
=======
// Try again if we hit an error page
fumble();
>>>>>>> b6825be (Revert "Reverted back to 4cd4110 before changes were made to monitoring. Trying")
return;
}
} catch (e) {
// Show blocked content modal for CORS errors too
const blockedModal = document.getElementById('blockedModal');
const retryBtn = document.getElementById('blockedRetryBtn');
const openBtn = document.getElementById('blockedOpenBtn');
blockedModal.classList.add('show');
retryBtn.onclick = () => {
blockedModal.classList.remove('show');
fumble();
};
openBtn.onclick = () => {
window.open(frame.src, '_blank');
blockedModal.classList.remove('show');
fumble();
};
return;
// Can't access title due to CORS - assume page is OK
}
>>>>>>> 495bda9 (Reverted back to 4cd4110 before changes were made to monitoring. Trying)
@ -411,22 +389,7 @@
// Handle load errors
frame.onerror = () => {
const blockedModal = document.getElementById('blockedModal');
const retryBtn = document.getElementById('blockedRetryBtn');
const openBtn = document.getElementById('blockedOpenBtn');
blockedModal.classList.add('show');
retryBtn.onclick = () => {
blockedModal.classList.remove('show');
fumble();
};
openBtn.onclick = () => {
window.open(frame.src, '_blank');
blockedModal.classList.remove('show');
fumble();
};
fumble(); // Try again if loading fails
};
};

View file

@ -909,6 +909,7 @@ main:hover .floating-button {
.full-license a:hover {
text-decoration: underline;
<<<<<<< HEAD
}
<<<<<<< HEAD
@ -993,4 +994,6 @@ main:hover .floating-button {
.blocked-open-btn:hover {
>>>>>>> 495bda9 (Reverted back to 4cd4110 before changes were made to monitoring. Trying)
background-color: #e0e0e0;
=======
>>>>>>> b6825be (Revert "Reverted back to 4cd4110 before changes were made to monitoring. Trying")
}