Skip to content

Commit

Permalink
Merge pull request #12727 from brave/pr12694_bug/de-amp-toggle_1.38.x
Browse files Browse the repository at this point in the history
Fix phantom de-amp toggle (uplift to 1.38.x)
  • Loading branch information
kjozwiak authored Mar 24, 2022
2 parents e17638e + ac5fab7 commit 421a75e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 0 additions & 11 deletions browser/resources/settings/brave_overrides/privacy_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ RegisterPolymerTemplateModifications({
</settings-subpage>
</template>
`)
const isDeAmpFeatureEnabled = loadTimeData.getBoolean('isDeAmpFeatureEnabled')
if (isDeAmpFeatureEnabled) {
pages.insertAdjacentHTML("afterend", `
<settings-toggle-button
class="hr"
pref="{{prefs.brave.de_amp.enabled}}"
label="${I18nBehavior.i18n("deAmpSettingLabel")}"
sub-label="${I18nBehavior.i18n("deAmpSettingSubLabel")}">
</settings-toggle-button>
`);
}
const isNativeBraveWalletEnabled = loadTimeData.getBoolean('isNativeBraveWalletFeatureEnabled')
if (isNativeBraveWalletEnabled) {
pages.insertAdjacentHTML('beforeend', `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
sub-label="$i18n{statsUsagePingEnabledDesc}"
on-settings-boolean-control-change="onStatsUsagePingEnabledChange_">
</settings-toggle-button>
<settings-toggle-button
class="cr-row"
pref="{{prefs.brave.de_amp.enabled}}"
label="$i18n{deAmpSettingLabel}"
sub-label="$i18n{deAmpSettingSubLabel}">
</settings-toggle-button>
</template>
<script src="brave_personalization_options.js"></script>
</dom-module>

0 comments on commit 421a75e

Please sign in to comment.