Skip to content

Commit b34afb6

Browse files
author
Shane Osbourne
committed
enabled on windows
1 parent 61a3efb commit b34afb6

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

Sources/ContentScopeScripts/dist/contentScope.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6214,6 +6214,7 @@
62146214
}
62156215
};
62166216

6217+
// @ts-expect-error https://app.asana.com/0/1201614831475344/1203979574128023/f
62176218
const processedConfig = processConfig(config, $USER_UNPROTECTED_DOMAINS$, $USER_PREFERENCES$);
62186219
if (isGloballyDisabled(processedConfig)) {
62196220
return

Sources/ContentScopeScripts/dist/contentScopeIsolated.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3837,7 +3837,7 @@
38373837
}
38383838

38393839
// select either closest `a` or defer to element.href
3840-
const targetValue = event.target.closest('a')?.href || element.href;
3840+
const targetValue = event.target.closest('a')?.href || /** @type {HTMLAnchorElement} */(element).href;
38413841
const validPrivatePlayerUrl = VideoParams.fromHref(targetValue)?.toPrivatePlayerUrl();
38423842

38433843
if (validPrivatePlayerUrl) {
@@ -4254,6 +4254,7 @@
42544254
}
42554255
};
42564256

4257+
// @ts-expect-error https://app.asana.com/0/1201614831475344/1203979574128023/f
42574258
const processedConfig = processConfig(config, $USER_UNPROTECTED_DOMAINS$, $USER_PREFERENCES$);
42584259
if (isGloballyDisabled(processedConfig)) {
42594260
return

inject/windows.js

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,46 @@ import { isTrackerOrigin } from '../src/trackers'
88

99
function initCode () {
1010
// @ts-expect-error https://app.asana.com/0/1201614831475344/1203979574128023/f
11-
const processedConfig = processConfig($CONTENT_SCOPE$, $USER_UNPROTECTED_DOMAINS$, $USER_PREFERENCES$, windowsSpecificFeatures)
11+
const config = $CONTENT_SCOPE$
12+
config.features.duckPlayer = {
13+
state: 'enabled',
14+
exceptions: [],
15+
settings: {
16+
overlays: {
17+
youtube: {
18+
state: 'disabled'
19+
},
20+
serpProxy: {
21+
state: 'disabled'
22+
}
23+
},
24+
domains: [
25+
{
26+
domain: 'youtube.com',
27+
patchSettings: [
28+
{
29+
op: 'replace',
30+
path: '/overlays/youtube/state',
31+
value: 'enabled'
32+
}
33+
]
34+
},
35+
{
36+
domain: 'duckduckgo.com',
37+
patchSettings: [
38+
{
39+
op: 'replace',
40+
path: '/overlays/serpProxy/state',
41+
value: 'enabled'
42+
}
43+
]
44+
}
45+
]
46+
}
47+
}
48+
// @ts-expect-error https://app.asana.com/0/1201614831475344/1203979574128023/f
49+
const processedConfig = processConfig(config, $USER_UNPROTECTED_DOMAINS$, $USER_PREFERENCES$, windowsSpecificFeatures)
50+
1251
if (isGloballyDisabled(processedConfig)) {
1352
return
1453
}

0 commit comments

Comments
 (0)