mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
better if/else readability
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
This commit is contained in:
@@ -255,8 +255,12 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
// ctrl = 0.1
|
||||
// default = 0.01
|
||||
// shift = 0.001
|
||||
if (e.shiftKey) step = (e.ctrlKey) ? 1 : 0.001;
|
||||
else step = (e.ctrlKey) ? 0.1 : 0.01;
|
||||
if (e.shiftKey) {
|
||||
step = (e.ctrlKey) ? 1 : 0.001;
|
||||
} else {
|
||||
step = (e.ctrlKey) ? 0.1 : 0.01;
|
||||
}
|
||||
|
||||
const sponsorTimeEdits = this.state.sponsorTimeEdits;
|
||||
let timeAsNumber = utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[index]);
|
||||
if (timeAsNumber !== null && e.deltaY != 0) {
|
||||
|
||||
Reference in New Issue
Block a user