add revert edge flags

This commit is contained in:
zoicware
2025-12-16 16:06:30 -05:00
committed by GitHub
parent 800157341b
commit fcc67f686e

View File

@@ -283,11 +283,16 @@ function Disable-Registry-Keys {
'edge-ntp-composer@2', #disables the copilot search in new tab page
'edge-compose@2' #disables the ai writing help
)
if ($revert) {
$jsonContent.browser.enabled_labs_experiments = $jsonContent.browser.enabled_labs_experiments | Where-Object { $_ -notin $flags }
}
else {
foreach ($flag in $flags) {
if ($jsonContent.browser.enabled_labs_experiments -notcontains $flag) {
$jsonContent.browser.enabled_labs_experiments += $flag
}
}
}
$newContent = $jsonContent | ConvertTo-Json -Compress -Depth 10
#add back the empty strings