From c7a17e0b729fa7ebced4b859d34f2044ebef4701 Mon Sep 17 00:00:00 2001 From: Jeremy J Parmenter Date: Mon, 16 Sep 2024 12:27:53 +0800 Subject: [PATCH 1/4] Docs: Fix white flash on iframe load for Safari --- docs/index.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/index.html b/docs/index.html index ee71a4c4b39baa..7ee820b9f2f0c3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -528,18 +528,20 @@

three.js

const oldIframe = iframe; iframe = oldIframe.cloneNode(); - + + iframe.style.display = 'none'; + iframe.onload = function(){ iframe.style.display = 'unset'; }; + iframe.onerror = function(){ iframe.style.display = 'unset'; }; + if ( hash && titles[ splitHash[ 0 ] ] ) { - + iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ]; subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' – '; - iframe.style.display = 'unset'; } else { iframe.src = ''; subtitle = ''; - iframe.style.display = 'none'; } From 6834f41f074359f9979e64979d88e95488984bbd Mon Sep 17 00:00:00 2001 From: Jeremy J Parmenter Date: Mon, 16 Sep 2024 14:10:30 +0800 Subject: [PATCH 2/4] Fix white page for root level /docs page (when no page is selected) --- docs/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index 7ee820b9f2f0c3..1eb261c571e169 100644 --- a/docs/index.html +++ b/docs/index.html @@ -530,11 +530,12 @@

three.js

iframe = oldIframe.cloneNode(); iframe.style.display = 'none'; - iframe.onload = function(){ iframe.style.display = 'unset'; }; - iframe.onerror = function(){ iframe.style.display = 'unset'; }; if ( hash && titles[ splitHash[ 0 ] ] ) { + iframe.onload = function(){ iframe.style.display = 'unset'; }; + iframe.onerror = function(){ iframe.style.display = 'unset'; }; + iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ]; subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' – '; From 327f94305e42c7e433c659244c7c5da1f923c9ce Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Mon, 16 Sep 2024 10:34:42 +0200 Subject: [PATCH 3/4] Update index.html Fix code style. --- docs/index.html | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/index.html b/docs/index.html index 1eb261c571e169..4480f329af66b3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -528,14 +528,23 @@

three.js

const oldIframe = iframe; iframe = oldIframe.cloneNode(); - - iframe.style.display = 'none'; - + + iframe.style.display = 'none'; + if ( hash && titles[ splitHash[ 0 ] ] ) { - - iframe.onload = function(){ iframe.style.display = 'unset'; }; - iframe.onerror = function(){ iframe.style.display = 'unset'; }; - + + iframe.onload = function () { + + iframe.style.display = 'unset'; + + }; + + iframe.onerror = function () { + + iframe.style.display = 'unset'; + + }; + iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ]; subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' – '; From 284a9427a0451fa72da122099fe107163c46acec Mon Sep 17 00:00:00 2001 From: Jeremy J Parmenter Date: Tue, 17 Sep 2024 06:52:54 +0800 Subject: [PATCH 4/4] Remove unnecessary error event listener --- docs/index.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/index.html b/docs/index.html index 4480f329af66b3..9b52effc3fc7e6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -539,12 +539,6 @@

three.js

}; - iframe.onerror = function () { - - iframe.style.display = 'unset'; - - }; - iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ]; subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' – ';