Skip to content

Commit

Permalink
Release build 5.6.0 [ci release]
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston authored and github-actions[bot] committed Mar 15, 2024
1 parent a9a0aeb commit edd9648
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 22 deletions.
6 changes: 4 additions & 2 deletions Sources/ContentScopeScripts/dist/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@
"harmfulApis",
"webCompat",
"windowsPermissionUsage",
"brokerProtection"
"brokerProtection",
"performanceMetrics"
]
);
const platformSupport = {
Expand All @@ -544,7 +545,8 @@
],
"apple-isolated": [
"duckPlayer",
"brokerProtection"
"brokerProtection",
"performanceMetrics"
],
android: [
...baseFeatures,
Expand Down
20 changes: 17 additions & 3 deletions Sources/ContentScopeScripts/dist/contentScopeIsolated.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
]);

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -429,7 +430,8 @@
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down Expand Up @@ -10803,9 +10805,21 @@
}
}

class PerformanceMetrics extends ContentFeature {
init () {
this.messaging.subscribe('getVitals', () => {
const paintResources = performance.getEntriesByType('paint');
const firstPaint = paintResources.find((entry) => entry.name === 'first-contentful-paint');
const vitals = firstPaint ? [firstPaint.startTime] : [];
this.messaging.notify('vitalsResult', { vitals });
});
}
}

var platformFeatures = {
ddg_feature_duckPlayer: DuckPlayerFeature,
ddg_feature_brokerProtection: BrokerProtection
ddg_feature_brokerProtection: BrokerProtection,
ddg_feature_performanceMetrics: PerformanceMetrics
};

/* global false */
Expand Down
6 changes: 4 additions & 2 deletions build/android/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,8 @@
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
]);

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -757,7 +758,8 @@
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down
6 changes: 4 additions & 2 deletions build/chrome-mv3/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,8 @@
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
]);

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -713,7 +714,8 @@
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down
2 changes: 1 addition & 1 deletion build/chrome/inject.js

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions build/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,8 @@
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
]);

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -710,7 +711,8 @@
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down Expand Up @@ -20686,6 +20688,17 @@
}
}

class PerformanceMetrics extends ContentFeature {
init () {
this.messaging.subscribe('getVitals', () => {
const paintResources = performance.getEntriesByType('paint');
const firstPaint = paintResources.find((entry) => entry.name === 'first-contentful-paint');
const vitals = firstPaint ? [firstPaint.startTime] : [];
this.messaging.notify('vitalsResult', { vitals });
});
}
}

var platformFeatures = {
ddg_feature_runtimeChecks: RuntimeChecks,
ddg_feature_fingerprintingAudio: FingerprintingAudio,
Expand All @@ -20706,7 +20719,8 @@
ddg_feature_harmfulApis: HarmfulApis,
ddg_feature_webCompat: WebCompat,
ddg_feature_windowsPermissionUsage: WindowsPermissionUsage,
ddg_feature_brokerProtection: BrokerProtection
ddg_feature_brokerProtection: BrokerProtection,
ddg_feature_performanceMetrics: PerformanceMetrics
};

/* global false */
Expand Down
6 changes: 4 additions & 2 deletions build/firefox/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
]);

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -723,7 +724,8 @@
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down
20 changes: 17 additions & 3 deletions build/integration/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,8 @@
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
]);

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -710,7 +711,8 @@
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down Expand Up @@ -20686,6 +20688,17 @@
}
}

class PerformanceMetrics extends ContentFeature {
init () {
this.messaging.subscribe('getVitals', () => {
const paintResources = performance.getEntriesByType('paint');
const firstPaint = paintResources.find((entry) => entry.name === 'first-contentful-paint');
const vitals = firstPaint ? [firstPaint.startTime] : [];
this.messaging.notify('vitalsResult', { vitals });
});
}
}

var platformFeatures = {
ddg_feature_runtimeChecks: RuntimeChecks,
ddg_feature_fingerprintingAudio: FingerprintingAudio,
Expand All @@ -20706,7 +20719,8 @@
ddg_feature_harmfulApis: HarmfulApis,
ddg_feature_webCompat: WebCompat,
ddg_feature_windowsPermissionUsage: WindowsPermissionUsage,
ddg_feature_brokerProtection: BrokerProtection
ddg_feature_brokerProtection: BrokerProtection,
ddg_feature_performanceMetrics: PerformanceMetrics
};

/* global false */
Expand Down
6 changes: 4 additions & 2 deletions build/windows/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,8 @@
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
]);

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -772,7 +773,8 @@
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down
6 changes: 4 additions & 2 deletions src/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const otherFeatures = /** @type {const} */([
'harmfulApis',
'webCompat',
'windowsPermissionUsage',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
])

/** @typedef {baseFeatures[number]|otherFeatures[number]} FeatureName */
Expand All @@ -33,7 +34,8 @@ export const platformSupport = {
],
'apple-isolated': [
'duckPlayer',
'brokerProtection'
'brokerProtection',
'performanceMetrics'
],
android: [
...baseFeatures,
Expand Down
12 changes: 12 additions & 0 deletions src/features/performance-metrics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import ContentFeature from '../content-feature'

export default class PerformanceMetrics extends ContentFeature {
init () {
this.messaging.subscribe('getVitals', () => {
const paintResources = performance.getEntriesByType('paint')
const firstPaint = paintResources.find((entry) => entry.name === 'first-contentful-paint')
const vitals = firstPaint ? [firstPaint.startTime] : []
this.messaging.notify('vitalsResult', { vitals })
})
}
}

0 comments on commit edd9648

Please sign in to comment.