Create BxLogger to show colored logs

This commit is contained in:
redphx
2024-04-30 18:52:56 +07:00
parent 26c318fb8d
commit edc8991a6a
9 changed files with 59 additions and 15 deletions

View File

@@ -26,6 +26,7 @@ import { PreloadedState } from "./utils/titles-info";
import { patchAudioContext, patchRtcCodecs, patchRtcPeerConnection, patchVideoApi } from "./utils/monkey-patches";
import { STATES } from "./utils/global";
import { injectStreamMenuButtons } from "./modules/stream/stream-ui";
import { BxLogger } from "./utils/bx-logger";
// Handle login page
if (window.location.pathname.includes('/auth/msa')) {
@@ -40,7 +41,7 @@ if (window.location.pathname.includes('/auth/msa')) {
throw new Error('[Better xCloud] Refreshing the page after logging in');
}
console.log(`[Better xCloud] readyState: ${document.readyState}`);
BxLogger.info('readyState', document.readyState);
if (BX_FLAGS.SafariWorkaround && document.readyState !== 'loading') {
// Stop loading