Skip to content

Commit

Permalink
WIP: trying to hide button from positive
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhong committed Sep 12, 2024
1 parent b3c00dc commit 9fc47e3
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions browser/resources/settings/brave_overrides/security_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,25 @@ RegisterPolymerTemplateModifications({
} else {
httpsOnlyModeToggle.setAttribute('hidden', 'true')
}
const secureDnsSettings = enableHttpsFirstModeNewSettings.content.
}

const positiveEnableHttpsFirstModeNewSettings = templateContent.
querySelector(
'template[is=dom-if][if="[[enableHttpsFirstModeNewSettings_]]"]'
)
if (!positiveEnableHttpsFirstModeNewSettings) {
console.error(
'[Brave Settings Overrides] Could not find template with ' +
'if=[[enableHttpsFirstModeNewSettings]] on security page.')
} else {
const showSecureDnsSettings = positiveEnableHttpsFirstModeNewSettings.content.
querySelector(
'template[is=dom-if][if="[[showSecureDnsSetting_]]"]')
if (!secureDnsSettings) {
console.error('[Brave Settings Overrides] Could not find' +
'secureDnsSettings on security page.')
if (!showSecureDnsSettings) {
console.error('[Brave Settings Overrides] Could not find template with ' +
'if=[[showSecureDnsSetting_]] on security page.')
} else {
const secureDnsToggle = secureDnsSettings.content.querySelector('settings-secure-dns')
const secureDnsToggle = showSecureDnsSettings.content.querySelector('settings-secure-dns')
if (!secureDnsToggle) {
console.error('[Brave Settings Overrides] Could not find' +
'secureDnsToggle on security page.')
Expand Down

0 comments on commit 9fc47e3

Please sign in to comment.