diff --git a/features/ua-ch-brands.json b/features/ua-ch-brands.json new file mode 100644 index 000000000..2aa6c5f6b --- /dev/null +++ b/features/ua-ch-brands.json @@ -0,0 +1,7 @@ +{ + "_meta": { + "description": "User agent client hint brands for the browser JavaScript API." + }, + "state": "disabled", + "exceptions": [] +} diff --git a/index.js b/index.js index 1b7c8f71b..ba8dda263 100644 --- a/index.js +++ b/index.js @@ -144,6 +144,7 @@ const featuresToIncludeTempUnprotectedExceptions = [ 'trackingCookies1p', 'trackingCookies3p', 'trackingParameters', + 'uaChBrands', 'unprotectedTemporary', 'webCompat', ]; diff --git a/overrides/windows-override.json b/overrides/windows-override.json index 8ce8c71b2..b2b72cef4 100644 --- a/overrides/windows-override.json +++ b/overrides/windows-override.json @@ -2545,6 +2545,26 @@ "clientBrandHint": { "state": "enabled" }, + "uaChBrands": { + "state": "enabled", + "settings": { + "additionalCheck": "disabled", + "conditionalChanges": [ + { + "condition": [ + { "internal": true }, + { "preview": true }], + "patchSettings": [ + { + "op": "replace", + "path": "/additionalCheck", + "value": "enabled" + } + ] + } + ] + } + }, "privacyPro": { "state": "enabled", "features": { diff --git a/schema/config.ts b/schema/config.ts index d8e2bf0f7..3ae6dc9bc 100644 --- a/schema/config.ts +++ b/schema/config.ts @@ -24,6 +24,7 @@ import { Taskbar } from './features/taskbar'; import { AppHealth } from './features/appHealth'; import { ElementHidingFeature } from './features/element-hiding'; import { RequestBlocklistFeature } from './features/request-blocklist'; +import { UaChBrandsFeature } from './features/ua-ch-brands'; import { UrlPredictorFeature } from './features/url-predictor'; export { WebCompatSettings } from './features/webcompat'; @@ -73,6 +74,7 @@ export type ConfigV5 = { customUserAgent?: CustomUserAgentFeature; elementHiding?: ElementHidingFeature; requestBlocklist?: RequestBlocklistFeature; + uaChBrands?: UaChBrandsFeature; urlPredictor?: UrlPredictorFeature; }; unprotectedTemporary: SiteException[]; diff --git a/schema/feature.ts b/schema/feature.ts index ddedb09fb..1a8776fd9 100644 --- a/schema/feature.ts +++ b/schema/feature.ts @@ -65,6 +65,7 @@ type ConditionBlock = { minSupportedVersion?: number; maxSupportedVersion?: number; internal?: boolean; + preview?: boolean; context?: { top?: boolean; frame?: boolean; diff --git a/schema/features/ua-ch-brands.ts b/schema/features/ua-ch-brands.ts new file mode 100644 index 000000000..74a219252 --- /dev/null +++ b/schema/features/ua-ch-brands.ts @@ -0,0 +1,11 @@ +import { CSSInjectFeatureSettings, Feature, FeatureState } from '../feature'; + +type StateToggle = 'enabled' | 'disabled'; + +type UaChBrandsSettings = CSSInjectFeatureSettings<{ + filterWebView2?: StateToggle; + overrideEdge?: StateToggle; + additionalCheck?: FeatureState; +}>; + +export type UaChBrandsFeature = Feature;