Skip to content

Commit

Permalink
Added security warning message.
Browse files Browse the repository at this point in the history
  • Loading branch information
boocmp committed Oct 21, 2024
1 parent e999fa1 commit 8cf76d6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions app/brave_settings_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@
<message name="IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_NOT_FOUND_ERROR" desc="Error message">
Scriptlet is not found.
</message>
<message name="IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_WARNING" desc="A warning message in Scriptlet editor.">
Don’t paste code here that you don’t understand or haven’t\nreviewed yourself. This could allow attackers to steal your\nidentity or take control of your computer.
</message>

<message name="IDS_SETTINGS_BRAVE_SHORTCUTS_TITLE" desc="The text label for the shortcuts settings page">
Shortcuts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
</div>
<div>
<div class="flex content">$i18n{adblockCustomScriptletDialogContentLabel}</div>
<textarea id="scriptlet-content" multiline="true" value="{{scriptlet.content::input}}" spellcheck="false">
<textarea id="scriptlet-content" multiline="true" value="{{scriptlet.content::input}}" spellcheck="false"
placeholder="$i18n{adblockCustomScriptletWarning}">
</textarea>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ class AdblockScriptletEditor extends AdblockScriptletEditorBase {
break
case ErrorCode.kAlreadyExists:
this.scriptletErrorMessage_ = this.i18n(
'adblockEditCustomScriptletAlreadyExistsError'
'adblockCustomScriptletAlreadyExistsError'
)
break
case ErrorCode.kInvalidName:
this.scriptletErrorMessage_ = this.i18n(
'adblockEditCustomScriptletInvalidNameError'
'adblockCustomScriptletInvalidNameError'
)
break
case ErrorCode.kNotFound:
this.scriptletErrorMessage_ = this.i18n(
'adblockEditCustomScriptletNotFoundError'
'adblockCustomScriptletNotFoundError'
)
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,12 +749,14 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source,
IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_DIALOG_SAVE_BUTTON},
{"adblockCustomScriptletDeleteConfirmation",
IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_DELETE_CONFIRMATION},
{"adblockEditCustomScriptletAlreadyExistsError",
{"adblockCustomScriptletAlreadyExistsError",
IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_ALREADY_EXISTS_ERROR},
{"adblockEditCustomScriptletInvalidNameError",
{"adblockCustomScriptletInvalidNameError",
IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_INVALID_NAME_ERROR},
{"adblockEditCustomScriptletNotFoundError",
{"adblockCustomScriptletNotFoundError",
IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_NOT_FOUND_ERROR},
{"adblockCustomScriptletWarning",
IDS_BRAVE_ADBLOCK_CUSTOM_SCRIPTLET_WARNING},

{"braveShortcutsPage", IDS_SETTINGS_BRAVE_SHORTCUTS_TITLE},
{"shortcutsPageSearchPlaceholder", IDS_SHORTCUTS_PAGE_SEARCH_PLACEHOLDER},
Expand Down

0 comments on commit 8cf76d6

Please sign in to comment.