Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
fix: Remove redundant crypto handling
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Sep 25, 2022
1 parent bf09ab0 commit 6e5048d
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions packages/userscript/source/ui/SettingsSectionUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,18 +464,10 @@ export abstract class SettingsSectionUi<TState> {
if (option.trigger !== undefined) {
const triggerButton = this._getTriggerButton(`set-${name}-trigger`, {
onClick: () => {
let value;
if (name === "crypto") {
value = this._promptPercentage(
this._host.i18n("ui.trigger.crypto.set", [label]),
this._renderPercentage(mustExist(option.trigger))
);
} else {
value = this._promptPercentage(
this._host.i18n("ui.trigger.set", [label]),
this._renderPercentage(mustExist(option.trigger))
);
}
const value = this._promptPercentage(
this._host.i18n("ui.trigger.set", [label]),
this._renderPercentage(mustExist(option.trigger))
);

if (value !== null) {
option.trigger = value;
Expand Down

0 comments on commit 6e5048d

Please sign in to comment.