fix: cancel iframeLoadTimeout on iframe.onload to prevent ghost auth notice
This commit is contained in:
@@ -222,6 +222,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
if (iframe) {
|
if (iframe) {
|
||||||
iframe.src = url;
|
iframe.src = url;
|
||||||
iframe.onload = () => {
|
iframe.onload = () => {
|
||||||
|
if (iframeLoadTimeout) {
|
||||||
|
clearTimeout(iframeLoadTimeout);
|
||||||
|
iframeLoadTimeout = null;
|
||||||
|
}
|
||||||
if (loader) loader.classList.add('hidden');
|
if (loader) loader.classList.add('hidden');
|
||||||
try {
|
try {
|
||||||
if (iframe.contentDocument && iframe.contentDocument.title.toLowerCase().includes('cloudflare')) {
|
if (iframe.contentDocument && iframe.contentDocument.title.toLowerCase().includes('cloudflare')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user