Skip to content

Commit d70092c

Browse files
Page context (#1928)
* Intial backup * Strip inert tags * Add readability analysis * PoC add in-page context * Updates * Disable the page context listener on duck.ai * Start inject hack and disable getPageContext * Clean up a bit * Add back in getPageContext * Simplify * Remove function * Observe changes and also type like a user * PoC checkbox * Continue to run on ddg domains * Scroll to the top * Switch to icon * Fix default selected state * Clean up logging * Add div wrappers for alignment * Fix lints * Lint fix * Remove test for now * bump bundle * Fix bundle test * Remove readability * Reduce bundle size * Remove article view
1 parent d1b3cf7 commit d70092c

File tree

5 files changed

+815
-2
lines changed

5 files changed

+815
-2
lines changed

injected/src/features.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const otherFeatures = /** @type {const} */ ([
2121
'messageBridge',
2222
'duckPlayer',
2323
'duckPlayerNative',
24+
'duckAiListener',
2425
'harmfulApis',
2526
'webCompat',
2627
'windowsPermissionUsage',
@@ -30,12 +31,13 @@ const otherFeatures = /** @type {const} */ ([
3031
'autofillPasswordImport',
3132
'favicon',
3233
'webTelemetry',
34+
'pageContext',
3335
]);
3436

3537
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
3638
/** @type {Record<string, FeatureName[]>} */
3739
export const platformSupport = {
38-
apple: ['webCompat', 'duckPlayerNative', ...baseFeatures],
40+
apple: ['webCompat', 'duckPlayerNative', ...baseFeatures, 'duckAiListener'],
3941
'apple-isolated': [
4042
'duckPlayer',
4143
'duckPlayerNative',
@@ -44,6 +46,7 @@ export const platformSupport = {
4446
'clickToLoad',
4547
'messageBridge',
4648
'favicon',
49+
'pageContext',
4750
],
4851
android: [...baseFeatures, 'webCompat', 'breakageReporting', 'duckPlayer', 'messageBridge'],
4952
'android-broker-protection': ['brokerProtection'],

0 commit comments

Comments
 (0)