mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Remove inline console fallbacks from static views
This commit is contained in:
1 parent
e2569d57f1
commit
4d95a6415f
11 files changed
+66
-132
No files matched your search
@@ -224,21 +224,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// Fallback loggers keep embeds functional without bitvidLogger while surfacing warnings/errors via the console.
|
||||
const fallbackDev = {
|
||||
// Provide no-op fallback loggers so embeds stay functional if bitvidLogger is unavailable.
|
||||
const noopLogger = {
|
||||
log: () => {},
|
||||
info: () => {},
|
||||
warn: (...args) => console.warn(...args),
|
||||
error: (...args) => console.error(...args),
|
||||
warn: () => {},
|
||||
error: () => {},
|
||||
};
|
||||
const fallbackUser = {
|
||||
log: () => {},
|
||||
info: () => {},
|
||||
warn: (...args) => console.warn(...args),
|
||||
error: (...args) => console.error(...args),
|
||||
};
|
||||
const dev = window.bitvidLogger?.dev || fallbackDev;
|
||||
const user = window.bitvidLogger?.user || fallbackUser;
|
||||
const dev = window.bitvidLogger?.dev || noopLogger;
|
||||
const user = window.bitvidLogger?.user || noopLogger;
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
// Logging functions for both on-page and console output.
|
||||
|
||||
Reference in new issue
Block a user