Support invidious in mv3

This commit is contained in:
Ajay
2024-06-19 23:14:27 +05:30
parent a95020dda3
commit 98a4a076bc
7 changed files with 36 additions and 39 deletions

View File

@@ -8,11 +8,15 @@ if (typeof (window) !== "undefined") {
export function logDebug(message: string) {
if (typeof (window) !== "undefined") {
window["SBLogs"].debug.push(`[${new Date().toISOString()}] ${message}`);
} else {
console.log(`[${new Date().toISOString()}] ${message}`)
}
}
export function logWarn(message: string) {
if (typeof (window) !== "undefined") {
window["SBLogs"].warn.push(`[${new Date().toISOString()}] ${message}`);
} else {
console.warn(`[${new Date().toISOString()}] ${message}`)
}
}