Skip to content

Conversation

@miallo
Copy link

@miallo miallo commented May 4, 2023

Hey!
Great that you picked up the work and even improved it with a nice UI! I had a first glance at a few of the files and made a couple of suggestions for cleanups (and also one commit that fixes a spelling in a JS variable that basically is not needed any more). These are all subjective, so feel free to drop any of the commits as you like (especially I am not sure about the keybindings being string arrays and what the plan was for them)

Could you please give it a try? I am not sure if I broke something with the keybindings - some are working for me (like f), but j/k/G/g g don't and I don't know if that is because of my changes (this is the first time I am working on a Safari extension and my debugging skills could still be improved...)

miallo added 7 commits May 5, 2023 00:57
This simplifies the code a bit for handling invalid inputs. Doing this
also removes the necessity for `ErrorText`
Previously it was an array, though it always had only one element. It might have been introduced to map multiple keys to the same action, but that was never implemented. In my opinion this makes it a little bit easier to understand
This is taken care of the next line `!settings.smoothScroll` which would be true for `undefined` as well
This tried to access `chrome.extension`, which obviously does not exist in Safari. Also it is not used anywhere
Since the function that is called depending on the value is empty this
does not have "real life consequences" if it was called multiple times,
but if that function should be kept at least we can fix the typo so that
future devs do not run into this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant