From 0a0b140dd2b4db3fe0a86f0840458937718ea5a1 Mon Sep 17 00:00:00 2001 From: Jade Macho Date: Tue, 14 Jan 2025 22:17:18 +0100 Subject: [PATCH] Log: Improve log experience on Firefox (which auto-expands dirs) --- JadefinLog.js | 4 +++- JadefinUtils.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/JadefinLog.js b/JadefinLog.js index 620c820..6fd622d 100644 --- a/JadefinLog.js +++ b/JadefinLog.js @@ -2,6 +2,8 @@ import JadefinIntegrity from "./JadefinIntegrity.js"; +import JadefinUtils from "./JadefinUtils.js"; + import cyrb53a from "./utils/cyrb53.js"; export default JadefinIntegrity("JadefinLog", import.meta.url, () => class JadefinLog { @@ -64,7 +66,7 @@ export default JadefinIntegrity("JadefinLog", import.meta.url, () => class Jadef return this; } - if (args.length == 1) { + if (args.length == 1 && !JadefinUtils.isFF) { if (args[0] instanceof Error) { console.error(args[0]); } else { diff --git a/JadefinUtils.js b/JadefinUtils.js index 191abf3..925fc80 100644 --- a/JadefinUtils.js +++ b/JadefinUtils.js @@ -16,6 +16,8 @@ export default JadefinIntegrity("JadefinUtils", import.meta.url, () => window["J /** @type {any} */ htmlVideoPlayer = null; + isFF = globalThis.navigator?.userAgent.toLowerCase().includes("firefox") || false; + get isInMovie() { return !!document.querySelector(".osdHeader"); }