Increase default maximum archive size to improve video storage capacity and enhance processing logic for whitelisted channels.
This commit is contained in:
parent
7ccc73bf03
commit
8e9e0e0b76
@ -17,7 +17,7 @@ let lastHudSignature = "";
|
|||||||
const STORAGE_KEY = "memberOnlyHidden";
|
const STORAGE_KEY = "memberOnlyHidden";
|
||||||
const STORAGE_KEY_SEEN = "memberOnlySeen";
|
const STORAGE_KEY_SEEN = "memberOnlySeen";
|
||||||
const STORAGE_KEY_MEMBER = "memberOnlyDetected";
|
const STORAGE_KEY_MEMBER = "memberOnlyDetected";
|
||||||
const DEFAULT_MAX_ARCHIVE = 500;
|
const DEFAULT_MAX_ARCHIVE = 2000;
|
||||||
const MAX_SNAPSHOT_CHARS = 20000;
|
const MAX_SNAPSHOT_CHARS = 20000;
|
||||||
let persistHiddenTimer = null;
|
let persistHiddenTimer = null;
|
||||||
let persistSeenTimer = null;
|
let persistSeenTimer = null;
|
||||||
@ -339,7 +339,7 @@ chrome.storage.onChanged.addListener(changes => {
|
|||||||
|
|
||||||
// Detect member-only videos and tag them for future updates.
|
// Detect member-only videos and tag them for future updates.
|
||||||
function process(root = document) {
|
function process(root = document) {
|
||||||
if (isWhitelistedChannelPage()) return;
|
const bypassHide = isWhitelistedChannelPage();
|
||||||
scanAllVideos(root);
|
scanAllVideos(root);
|
||||||
const badges = root.querySelectorAll("badge-shape");
|
const badges = root.querySelectorAll("badge-shape");
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ function process(root = document) {
|
|||||||
debugLog("Whitelisted:", whitelisted);
|
debugLog("Whitelisted:", whitelisted);
|
||||||
debugGroupEnd();
|
debugGroupEnd();
|
||||||
|
|
||||||
if (!whitelisted) {
|
if (!whitelisted && !bypassHide) {
|
||||||
if (id && memberOnlyIndex.has(id)) {
|
if (id && memberOnlyIndex.has(id)) {
|
||||||
const meta = memberOnlyIndex.get(id);
|
const meta = memberOnlyIndex.get(id);
|
||||||
if (!meta.hidden) flashHudDot();
|
if (!meta.hidden) flashHudDot();
|
||||||
@ -981,7 +981,7 @@ function renderHudPanel(panel) {
|
|||||||
? items[0].channelLabel
|
? items[0].channelLabel
|
||||||
: creator;
|
: creator;
|
||||||
const total = totals.get(creator) || items.length;
|
const total = totals.get(creator) || items.length;
|
||||||
const memberCount = memberTotals.get(creator) || items.length;
|
const memberCount = memberTotals.get(creator) || 0;
|
||||||
const percent = total > 0 ? Math.round((memberCount / total) * 100) : 0;
|
const percent = total > 0 ? Math.round((memberCount / total) * 100) : 0;
|
||||||
summary.textContent = `${label} (${memberCount}/${total} known, ${percent}%)`;
|
summary.textContent = `${label} (${memberCount}/${total} known, ${percent}%)`;
|
||||||
details.appendChild(summary);
|
details.appendChild(summary);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user