mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-18 15:23:13 +00:00
fix: harden frame observation and unblock supported Drive tabs
Audit follow-ups on the same-origin frame walk: - prune detached frames from the load-hook set so ad/SPA frame churn no longer grows it for the page's lifetime - hook load on nested frames, not just top-level ones - re-observe from scratch after a frame reload instead of leaving the replaced document's tree registered - reset the frame registry when the heartbeat error path disconnects Also: a broad parent domain in the blacklist no longer hides a host with its own supported player path (drive.google.com behind google.com), while an exact user entry for that host still filters it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+14
-1
@@ -179,6 +179,15 @@ export const BLACKLIST_DOMAINS = [
|
||||
'skribbl.io'
|
||||
];
|
||||
|
||||
/**
|
||||
* Hosts KoalaSync supports through a site-specific player path. A broad parent
|
||||
* domain in the list (e.g. 'google.com') must not hide them from tab selection.
|
||||
* An exact entry for the host itself still filters it, so users stay in control.
|
||||
*/
|
||||
export const BLACKLIST_SUFFIX_EXCEPTIONS = [
|
||||
'drive.google.com'
|
||||
];
|
||||
|
||||
export const CUSTOM_BLACKLIST_STORAGE_KEY = 'customBlacklistDomains';
|
||||
export const MAX_BLACKLIST_DOMAINS = 500;
|
||||
|
||||
@@ -246,5 +255,9 @@ export function isUrlBlacklisted(rawUrl, domains = BLACKLIST_DOMAINS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return domains.some(domain => hostname === domain || hostname.endsWith(`.${domain}`));
|
||||
return domains.some(domain => {
|
||||
if (hostname === domain) return true;
|
||||
if (!hostname.endsWith(`.${domain}`)) return false;
|
||||
return !BLACKLIST_SUFFIX_EXCEPTIONS.includes(hostname);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user