mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 05:13:01 +00:00
Add logger fallbacks for iframe forms and views
This commit is contained in:
1 parent
15a1986c55
commit
b13104162d
11 files changed
+247
-16
No files matched your search
@@ -16,6 +16,22 @@
|
||||
</section>
|
||||
|
||||
<script>
|
||||
// Fallback loggers keep embeds functional without bitvidLogger while surfacing warnings/errors via the console.
|
||||
const fallbackDev = {
|
||||
log: () => {},
|
||||
info: () => {},
|
||||
warn: (...args) => console.warn(...args),
|
||||
error: (...args) => console.error(...args),
|
||||
};
|
||||
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;
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
// Fetch the Markdown file
|
||||
@@ -40,7 +56,7 @@
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("Error loading 'Getting Started' content:", err);
|
||||
user.error("Error loading 'Getting Started' content:", err);
|
||||
const container = document.getElementById("markdown-container");
|
||||
if (container) {
|
||||
container.innerHTML = `
|
||||
|
||||
Reference in new issue
Block a user