Fix loading time box not hidden sometimes

This commit is contained in:
redphx 2024-03-20 17:56:21 +07:00
parent 0d80edb7cb
commit 1e56e7b2a2

View File

@ -3960,7 +3960,7 @@ class LoadingScreen {
LoadingScreen.#orgWebTitle && (document.title = LoadingScreen.#orgWebTitle); LoadingScreen.#orgWebTitle && (document.title = LoadingScreen.#orgWebTitle);
LoadingScreen.#$waitTimeBox && LoadingScreen.#$waitTimeBox.classList.add('bx-gone'); LoadingScreen.#$waitTimeBox && LoadingScreen.#$waitTimeBox.classList.add('bx-gone');
if (LoadingScreen.#$bgStyle) { if (getPref(Preferences.UI_LOADING_SCREEN_GAME_ART) && LoadingScreen.#$bgStyle) {
const $rocketBg = document.querySelector('#game-stream rect[width="800"]'); const $rocketBg = document.querySelector('#game-stream rect[width="800"]');
$rocketBg && $rocketBg.addEventListener('transitionend', e => { $rocketBg && $rocketBg.addEventListener('transitionend', e => {
LoadingScreen.#$bgStyle.textContent += ` LoadingScreen.#$bgStyle.textContent += `
@ -11479,7 +11479,7 @@ window.addEventListener(BxEvent.STREAM_LOADING, e => {
window.addEventListener(BxEvent.STREAM_STARTING, e => { window.addEventListener(BxEvent.STREAM_STARTING, e => {
// Hide loading screen // Hide loading screen
getPref(Preferences.UI_LOADING_SCREEN_GAME_ART) && LoadingScreen.hide(); LoadingScreen.hide();
}); });
window.addEventListener(BxEvent.STREAM_PLAYING, e => { window.addEventListener(BxEvent.STREAM_PLAYING, e => {