Revert "Reverted back to 4cd4110
before changes were made to monitoring. Trying"
This reverts commit 495bda967f487a8e3ea040b4dc057fe6ca9817ae. push push
This commit is contained in:
parent
97f3a78f9d
commit
92628b6dc5
2 changed files with 11 additions and 45 deletions
53
index.html
53
index.html
|
@ -191,17 +191,6 @@
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<main>
|
||||||
<iframe
|
<iframe
|
||||||
id="contentFrame"
|
id="contentFrame"
|
||||||
|
@ -267,6 +256,7 @@
|
||||||
|
|
||||||
// Wait for the page to load then focus
|
// Wait for the page to load then focus
|
||||||
frame.onload = () => {
|
frame.onload = () => {
|
||||||
|
// Check if we landed on a blocked/error page
|
||||||
try {
|
try {
|
||||||
// Get the actual URL from the iframe
|
// Get the actual URL from the iframe
|
||||||
const currentUrl = frame.contentWindow.location.href;
|
const currentUrl = frame.contentWindow.location.href;
|
||||||
|
@ -317,6 +307,7 @@
|
||||||
title.includes("cannot") ||
|
title.includes("cannot") ||
|
||||||
title.includes("denied")
|
title.includes("denied")
|
||||||
) {
|
) {
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
fumble();
|
fumble();
|
||||||
return;
|
return;
|
||||||
|
@ -365,27 +356,14 @@
|
||||||
blockedModal.classList.remove('show');
|
blockedModal.classList.remove('show');
|
||||||
fumble();
|
fumble();
|
||||||
};
|
};
|
||||||
|
=======
|
||||||
|
// Try again if we hit an error page
|
||||||
|
fumble();
|
||||||
|
>>>>>>> b6825be (Revert "Reverted back to 4cd4110 before changes were made to monitoring. Trying")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Show blocked content modal for CORS errors too
|
// Can't access title due to CORS - assume page is OK
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
>>>>>>> 495bda9 (Reverted back to 4cd4110 before changes were made to monitoring. Trying)
|
>>>>>>> 495bda9 (Reverted back to 4cd4110 before changes were made to monitoring. Trying)
|
||||||
|
|
||||||
|
@ -411,22 +389,7 @@
|
||||||
|
|
||||||
// Handle load errors
|
// Handle load errors
|
||||||
frame.onerror = () => {
|
frame.onerror = () => {
|
||||||
const blockedModal = document.getElementById('blockedModal');
|
fumble(); // Try again if loading fails
|
||||||
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();
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -909,6 +909,7 @@ main:hover .floating-button {
|
||||||
|
|
||||||
.full-license a:hover {
|
.full-license a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
<<<<<<< HEAD
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
@ -993,4 +994,6 @@ main:hover .floating-button {
|
||||||
.blocked-open-btn:hover {
|
.blocked-open-btn:hover {
|
||||||
>>>>>>> 495bda9 (Reverted back to 4cd4110 before changes were made to monitoring. Trying)
|
>>>>>>> 495bda9 (Reverted back to 4cd4110 before changes were made to monitoring. Trying)
|
||||||
background-color: #e0e0e0;
|
background-color: #e0e0e0;
|
||||||
|
=======
|
||||||
|
>>>>>>> b6825be (Revert "Reverted back to 4cd4110 before changes were made to monitoring. Trying")
|
||||||
}
|
}
|
Loading…
Reference in a new issue