SponsorBlock
SponsorBlock copied to clipboard
Refactored inspectTime into previewTime
- [x] I agree to license my contribution under LGPL-3.0 or my contribution is from another project with a license compatible with LGPL-3.0
To test this pull request, follow the instructions in the wiki.
Looking through the source code I noticed that these two functions are extremely similar and thought there was two options to clean it up:
- Merge the two functions into one [Implemented this one]
- Simplify the old
previewTimefunction by removing theskipToEndTimeargument and implementing functionality for it in theinspectTimefunction
I appretiate the try but I think this makes the code less understandble
Yeah it kills the readability, if you are looking for more readable code would something like this be preferred as Inspect and End buttons are functionally identical.