diff --git a/content.js b/content.js index 6820307..5defce0 100644 --- a/content.js +++ b/content.js @@ -28,6 +28,16 @@ function debugLog(...args) { console.log("[MemberFilter]", ...args); } +function debugGroup(...args) { + if (!debugEnabled) return; + console.group("[MemberFilter]", ...args); +} + +function debugGroupEnd() { + if (!debugEnabled) return; + console.groupEnd(); +} + function normalizeKey(value) { return value .toLowerCase() @@ -110,15 +120,13 @@ function process(root = document) { const whitelisted = whitelist.includes(channelKey); - if (debugEnabled) { - console.group("[MemberFilter]"); - console.log("Title :", title); - console.log("Channel:", channel); - console.log("URL :", url); - console.log("ID :", id || "(no id)"); - console.log("Whitelisted:", whitelisted); - console.groupEnd(); - } + debugGroup(); + debugLog("Title :", title); + debugLog("Channel:", channel); + debugLog("URL :", url); + debugLog("ID :", id || "(no id)"); + debugLog("Whitelisted:", whitelisted); + debugGroupEnd(); if (!whitelisted) { video.setAttribute(`data-${DATA_PREFIX}-hidden`, "true"); diff --git a/popup.css b/popup.css index d36dd96..e83fd09 100644 --- a/popup.css +++ b/popup.css @@ -14,6 +14,17 @@ h3 { font-size: 13px; } +.subtext { + margin: 0 0 10px; + font-size: 11px; + line-height: 1.3; + color: #5b4a33; +} + +.subtext.subtext-debug { + margin: 6px 0 8px; +} + .row { display: flex; gap: 6px; diff --git a/popup.html b/popup.html index 64b3a69..133df84 100644 --- a/popup.html +++ b/popup.html @@ -7,6 +7,10 @@
+ Hide member-only videos by default. Whitelisted creators stay visible. + Add the channel name and its @handle or link. +
+ Debug logs will appear in the console only when enabled. +