-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3737252
commit 7d683e3
Showing
8 changed files
with
67 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
browser/resources/settings/brave_overrides/site_details.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) 2021 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
// you can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
import {RegisterPolymerTemplateModifications} from 'chrome://brave-resources/polymer_overriding.js' | ||
import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js' | ||
|
||
RegisterPolymerTemplateModifications({ | ||
'site-details': (templateContent) => { | ||
const firstPermissionItem = templateContent.querySelector('div.list-frame > site-details-permission:nth-child(1)') | ||
if (!firstPermissionItem) { | ||
console.error(`[Brave Settings Overrides] Couldn't find first permission item`) | ||
} else { | ||
firstPermissionItem.insertAdjacentHTML('beforebegin', ` | ||
<site-details-permission | ||
category="[[contentSettingsTypesEnum_.AUTOPLAY]]" | ||
icon="cr:extension" label="${I18nBehavior.i18n('siteSettingsAutoplay')}"> | ||
</site-details-permission> | ||
`) | ||
const isNativeBraveWalletEnabled = loadTimeData.getBoolean('isNativeBraveWalletFeatureEnabled') | ||
if (isNativeBraveWalletEnabled) { | ||
firstPermissionItem.insertAdjacentHTML('beforebegin', ` | ||
<site-details-permission | ||
category="[[contentSettingsTypesEnum_.ETHEREUM]]" | ||
icon="cr:extension" label="${I18nBehavior.i18n('siteSettingsEthereum')}"> | ||
</site-details-permission> | ||
`) | ||
} | ||
} | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
patches/chrome-browser-resources-settings-site_settings-constants.js.patch
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
patches/chrome-browser-resources-settings-site_settings-site_details.html.patch
This file was deleted.
Oops, something went wrong.