mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +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
|
// ctrl = 0.1
|
||||||
// default = 0.01
|
// default = 0.01
|
||||||
// shift = 0.001
|
// shift = 0.001
|
||||||
if (e.shiftKey) step = (e.ctrlKey) ? 1 : 0.001;
|
if (e.shiftKey) {
|
||||||
else step = (e.ctrlKey) ? 0.1 : 0.01;
|
step = (e.ctrlKey) ? 1 : 0.001;
|
||||||
|
} else {
|
||||||
|
step = (e.ctrlKey) ? 0.1 : 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
const sponsorTimeEdits = this.state.sponsorTimeEdits;
|
const sponsorTimeEdits = this.state.sponsorTimeEdits;
|
||||||
let timeAsNumber = utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[index]);
|
let timeAsNumber = utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[index]);
|
||||||
if (timeAsNumber !== null && e.deltaY != 0) {
|
if (timeAsNumber !== null && e.deltaY != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user