From 07cb8e5300852dfaaf4aa7e0e0c6003d8fccb6f2 Mon Sep 17 00:00:00 2001 From: Joe <33972521+hnb-ku@users.noreply.github.com> Date: Fri, 24 Jun 2022 13:59:27 +0800 Subject: [PATCH] FIX: Reverts #17225 & #17223 (#17228) * Revert "FIX: Defer removing the splash screen until the window load event fires (#17225)" This reverts commit 6a61e855b3362f88bb0faa416c98f9a8328454f6. * Revert "FIX: Remove splash screen in no-js view (#17223)" This reverts commit 5257cae1b804c61064de417c7046478cebd99752. --- app/assets/javascripts/discourse/app/app.js | 10 ++-------- app/views/common/_discourse_splash.html.erb | 15 +-------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/app/assets/javascripts/discourse/app/app.js b/app/assets/javascripts/discourse/app/app.js index be305596c42..3ff0205cccc 100644 --- a/app/assets/javascripts/discourse/app/app.js +++ b/app/assets/javascripts/discourse/app/app.js @@ -82,14 +82,8 @@ const Discourse = Application.extend({ }); }); - window.addEventListener( - "load", - () => { - // The app booted. Remove the splash screen - document.querySelector("#d-splash")?.remove(); - }, - { once: true } - ); + // The app booted. Remove the splash screen + document.querySelector("#d-splash")?.remove(); }, _registerPluginCode(version, code) { diff --git a/app/views/common/_discourse_splash.html.erb b/app/views/common/_discourse_splash.html.erb index 993634f3bae..5e6fe84ea01 100644 --- a/app/views/common/_discourse_splash.html.erb +++ b/app/views/common/_discourse_splash.html.erb @@ -3,7 +3,7 @@ - <%- end %>