Skip to content

Commit edd9648

Browse files
Release build 5.6.0 [ci release]
1 parent a9a0aeb commit edd9648

File tree

11 files changed

+88
-22
lines changed

11 files changed

+88
-22
lines changed

Sources/ContentScopeScripts/dist/contentScope.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,8 @@
534534
"harmfulApis",
535535
"webCompat",
536536
"windowsPermissionUsage",
537-
"brokerProtection"
537+
"brokerProtection",
538+
"performanceMetrics"
538539
]
539540
);
540541
const platformSupport = {
@@ -544,7 +545,8 @@
544545
],
545546
"apple-isolated": [
546547
"duckPlayer",
547-
"brokerProtection"
548+
"brokerProtection",
549+
"performanceMetrics"
548550
],
549551
android: [
550552
...baseFeatures,

Sources/ContentScopeScripts/dist/contentScopeIsolated.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@
417417
'harmfulApis',
418418
'webCompat',
419419
'windowsPermissionUsage',
420-
'brokerProtection'
420+
'brokerProtection',
421+
'performanceMetrics'
421422
]);
422423

423424
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -429,7 +430,8 @@
429430
],
430431
'apple-isolated': [
431432
'duckPlayer',
432-
'brokerProtection'
433+
'brokerProtection',
434+
'performanceMetrics'
433435
],
434436
android: [
435437
...baseFeatures,
@@ -10803,9 +10805,21 @@
1080310805
}
1080410806
}
1080510807

10808+
class PerformanceMetrics extends ContentFeature {
10809+
init () {
10810+
this.messaging.subscribe('getVitals', () => {
10811+
const paintResources = performance.getEntriesByType('paint');
10812+
const firstPaint = paintResources.find((entry) => entry.name === 'first-contentful-paint');
10813+
const vitals = firstPaint ? [firstPaint.startTime] : [];
10814+
this.messaging.notify('vitalsResult', { vitals });
10815+
});
10816+
}
10817+
}
10818+
1080610819
var platformFeatures = {
1080710820
ddg_feature_duckPlayer: DuckPlayerFeature,
10808-
ddg_feature_brokerProtection: BrokerProtection
10821+
ddg_feature_brokerProtection: BrokerProtection,
10822+
ddg_feature_performanceMetrics: PerformanceMetrics
1080910823
};
1081010824

1081110825
/* global false */

build/android/contentScope.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,8 @@
745745
'harmfulApis',
746746
'webCompat',
747747
'windowsPermissionUsage',
748-
'brokerProtection'
748+
'brokerProtection',
749+
'performanceMetrics'
749750
]);
750751

751752
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -757,7 +758,8 @@
757758
],
758759
'apple-isolated': [
759760
'duckPlayer',
760-
'brokerProtection'
761+
'brokerProtection',
762+
'performanceMetrics'
761763
],
762764
android: [
763765
...baseFeatures,

build/chrome-mv3/inject.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,8 @@
701701
'harmfulApis',
702702
'webCompat',
703703
'windowsPermissionUsage',
704-
'brokerProtection'
704+
'brokerProtection',
705+
'performanceMetrics'
705706
]);
706707

707708
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -713,7 +714,8 @@
713714
],
714715
'apple-isolated': [
715716
'duckPlayer',
716-
'brokerProtection'
717+
'brokerProtection',
718+
'performanceMetrics'
717719
],
718720
android: [
719721
...baseFeatures,

build/chrome/inject.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/contentScope.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,8 @@
698698
'harmfulApis',
699699
'webCompat',
700700
'windowsPermissionUsage',
701-
'brokerProtection'
701+
'brokerProtection',
702+
'performanceMetrics'
702703
]);
703704

704705
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -710,7 +711,8 @@
710711
],
711712
'apple-isolated': [
712713
'duckPlayer',
713-
'brokerProtection'
714+
'brokerProtection',
715+
'performanceMetrics'
714716
],
715717
android: [
716718
...baseFeatures,
@@ -20686,6 +20688,17 @@
2068620688
}
2068720689
}
2068820690

20691+
class PerformanceMetrics extends ContentFeature {
20692+
init () {
20693+
this.messaging.subscribe('getVitals', () => {
20694+
const paintResources = performance.getEntriesByType('paint');
20695+
const firstPaint = paintResources.find((entry) => entry.name === 'first-contentful-paint');
20696+
const vitals = firstPaint ? [firstPaint.startTime] : [];
20697+
this.messaging.notify('vitalsResult', { vitals });
20698+
});
20699+
}
20700+
}
20701+
2068920702
var platformFeatures = {
2069020703
ddg_feature_runtimeChecks: RuntimeChecks,
2069120704
ddg_feature_fingerprintingAudio: FingerprintingAudio,
@@ -20706,7 +20719,8 @@
2070620719
ddg_feature_harmfulApis: HarmfulApis,
2070720720
ddg_feature_webCompat: WebCompat,
2070820721
ddg_feature_windowsPermissionUsage: WindowsPermissionUsage,
20709-
ddg_feature_brokerProtection: BrokerProtection
20722+
ddg_feature_brokerProtection: BrokerProtection,
20723+
ddg_feature_performanceMetrics: PerformanceMetrics
2071020724
};
2071120725

2071220726
/* global false */

build/firefox/inject.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@
711711
'harmfulApis',
712712
'webCompat',
713713
'windowsPermissionUsage',
714-
'brokerProtection'
714+
'brokerProtection',
715+
'performanceMetrics'
715716
]);
716717

717718
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -723,7 +724,8 @@
723724
],
724725
'apple-isolated': [
725726
'duckPlayer',
726-
'brokerProtection'
727+
'brokerProtection',
728+
'performanceMetrics'
727729
],
728730
android: [
729731
...baseFeatures,

build/integration/contentScope.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,8 @@
698698
'harmfulApis',
699699
'webCompat',
700700
'windowsPermissionUsage',
701-
'brokerProtection'
701+
'brokerProtection',
702+
'performanceMetrics'
702703
]);
703704

704705
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -710,7 +711,8 @@
710711
],
711712
'apple-isolated': [
712713
'duckPlayer',
713-
'brokerProtection'
714+
'brokerProtection',
715+
'performanceMetrics'
714716
],
715717
android: [
716718
...baseFeatures,
@@ -20686,6 +20688,17 @@
2068620688
}
2068720689
}
2068820690

20691+
class PerformanceMetrics extends ContentFeature {
20692+
init () {
20693+
this.messaging.subscribe('getVitals', () => {
20694+
const paintResources = performance.getEntriesByType('paint');
20695+
const firstPaint = paintResources.find((entry) => entry.name === 'first-contentful-paint');
20696+
const vitals = firstPaint ? [firstPaint.startTime] : [];
20697+
this.messaging.notify('vitalsResult', { vitals });
20698+
});
20699+
}
20700+
}
20701+
2068920702
var platformFeatures = {
2069020703
ddg_feature_runtimeChecks: RuntimeChecks,
2069120704
ddg_feature_fingerprintingAudio: FingerprintingAudio,
@@ -20706,7 +20719,8 @@
2070620719
ddg_feature_harmfulApis: HarmfulApis,
2070720720
ddg_feature_webCompat: WebCompat,
2070820721
ddg_feature_windowsPermissionUsage: WindowsPermissionUsage,
20709-
ddg_feature_brokerProtection: BrokerProtection
20722+
ddg_feature_brokerProtection: BrokerProtection,
20723+
ddg_feature_performanceMetrics: PerformanceMetrics
2071020724
};
2071120725

2071220726
/* global false */

build/windows/contentScope.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,8 @@
760760
'harmfulApis',
761761
'webCompat',
762762
'windowsPermissionUsage',
763-
'brokerProtection'
763+
'brokerProtection',
764+
'performanceMetrics'
764765
]);
765766

766767
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -772,7 +773,8 @@
772773
],
773774
'apple-isolated': [
774775
'duckPlayer',
775-
'brokerProtection'
776+
'brokerProtection',
777+
'performanceMetrics'
776778
],
777779
android: [
778780
...baseFeatures,

src/features.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const otherFeatures = /** @type {const} */([
2121
'harmfulApis',
2222
'webCompat',
2323
'windowsPermissionUsage',
24-
'brokerProtection'
24+
'brokerProtection',
25+
'performanceMetrics'
2526
])
2627

2728
/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
@@ -33,7 +34,8 @@ export const platformSupport = {
3334
],
3435
'apple-isolated': [
3536
'duckPlayer',
36-
'brokerProtection'
37+
'brokerProtection',
38+
'performanceMetrics'
3739
],
3840
android: [
3941
...baseFeatures,

0 commit comments

Comments
 (0)