mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
fix iframe
This commit is contained in:
parent
5e81d64ffd
commit
301783ec50
1 changed files with 10 additions and 6 deletions
|
@ -1357,6 +1357,9 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
|
||||||
try {
|
try {
|
||||||
$('#avideoModalIframe').load(function () {
|
$('#avideoModalIframe').load(function () {
|
||||||
contentLoaded = true;
|
contentLoaded = true;
|
||||||
|
console.log('avideoModalIframeWithClassName content loaded 1');
|
||||||
|
clearTimout(avideoModalIframeWithClassNameTimeout);
|
||||||
|
avideoModalIframeRemove();
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
@ -1364,16 +1367,17 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
|
||||||
if($('#avideoModalIframe').contents().find("body").length){
|
if($('#avideoModalIframe').contents().find("body").length){
|
||||||
contentLoaded = true;
|
contentLoaded = true;
|
||||||
}
|
}
|
||||||
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
|
|
||||||
// is not loaded
|
|
||||||
url = addGetParam(url, 'avideoIframe', 0);
|
|
||||||
document.location = url;
|
|
||||||
}, 5000);
|
|
||||||
|
|
||||||
if(contentLoaded){
|
if(contentLoaded){
|
||||||
console.log('avideoModalIframeWithClassName content loaded');
|
console.log('avideoModalIframeWithClassName content loaded 2');
|
||||||
clearTimout(avideoModalIframeWithClassNameTimeout);
|
clearTimout(avideoModalIframeWithClassNameTimeout);
|
||||||
avideoModalIframeRemove();
|
avideoModalIframeRemove();
|
||||||
|
}else{
|
||||||
|
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
|
||||||
|
// is not loaded
|
||||||
|
url = addGetParam(url, 'avideoIframe', 0);
|
||||||
|
document.location = url;
|
||||||
|
}, 5000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue