rename log prefixes: '[goon' -> '[vidplex' in runtime logs
CI / test (pull_request) Successful in 5m34s

This commit is contained in:
robot committed 2026-08-31 01:55:27 +00:00
1 parent 64d792632d
commit c826669c7d
4 files changed
+56 -56

No files matched your search

+8 -8
View File
@@ -10,8 +10,8 @@ const TAGGED_KEY = 'goon_tagged';
// Set to true to enable verbose console output in the popup.
const DEBUG = true; // TEMP: enabled for debugging — revert to false when done
function log(...args) { if (DEBUG) console.log('[goon]', ...args); }
function warn(...args) { if (DEBUG) console.warn('[goon]', ...args); }
function log(...args) { if (DEBUG) console.log('[vidplex]', ...args); }
function warn(...args) { if (DEBUG) console.warn('[vidplex]', ...args); }
/** Log a message to the active tab's page console (visible to the user in DevTools). */
async function logToPage(msg) {
@@ -21,7 +21,7 @@ async function logToPage(msg) {
if (!tab) return;
await chrome.scripting.executeScript({
target: { tabId: tab.id },
func: (m) => { console.log('[goon-page]', m); },
func: (m) => { console.log('[vidplex-page]', m); },
args: [msg],
});
} catch { /* ignore — tab may have navigated away */ }
@@ -120,7 +120,7 @@ function m3u8DeepProbeFn() {
// DEBUG: Log probe activity to console
function probeLog(...args) {
try { console.log('[goon-probe]', ...args); } catch(e) {}
try { console.log('[vidplex-probe]', ...args); } catch(e) {}
}
// NOTE: the probe is injected with chrome.scripting's `world: 'MAIN'`, so it
// runs in the page's main world and can see page globals. `typeof chrome` is
@@ -973,14 +973,14 @@ function makeVideoEntry(video, tabTitle, posterFromContent) {
if (video.hlsManifest) {
// Reject fake/invalid manifest paths before storing
if (!isValidManifestUrl(video.hlsManifest)) {
console.warn('[goon] Rejecting fake manifest URL:', video.hlsManifest.substring(0, 120));
console.warn('[vidplex] Rejecting fake manifest URL:', video.hlsManifest.substring(0, 120));
} else {
entry.hlsManifest = video.hlsManifest;
}
}
// Also validate src when it looks like a manifest URL (no hlsManifest set but src has .m3u8)
if (!entry.hlsManifest && entry.src?.includes('.m3u8') && !isValidManifestUrl(entry.src)) {
console.warn('[goon] Rejecting fake manifest URL from src:', entry.src.substring(0, 120));
console.warn('[vidplex] Rejecting fake manifest URL from src:', entry.src.substring(0, 120));
// Don't treat it as HLS — leave mediaType as-is (likely 'video' or unset)
}
return entry;
@@ -1297,7 +1297,7 @@ findBtn.addEventListener('click', async () => {
}
}
}
console.group('[goon-diag] HLS diagnostics');
console.group('[vidplex-diag] HLS diagnostics');
for (const line of diag) {
console.log(line);
}
@@ -1305,7 +1305,7 @@ findBtn.addEventListener('click', async () => {
},
});
} catch (e) {
console.warn('[goon-diag] Diagnostic failed:', e.message);
console.warn('[vidplex-diag] Diagnostic failed:', e.message);
}
}
}