From 6e5048df0d39e20f3db307f2951aaeaee6ba85eb Mon Sep 17 00:00:00 2001 From: Oliver Salzburg Date: Sun, 25 Sep 2022 16:30:20 +0200 Subject: [PATCH] fix: Remove redundant crypto handling --- .../userscript/source/ui/SettingsSectionUi.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/userscript/source/ui/SettingsSectionUi.ts b/packages/userscript/source/ui/SettingsSectionUi.ts index 9036d555..8ef1902d 100644 --- a/packages/userscript/source/ui/SettingsSectionUi.ts +++ b/packages/userscript/source/ui/SettingsSectionUi.ts @@ -464,18 +464,10 @@ export abstract class SettingsSectionUi { 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;