justdanpo / VivaldiHooks

VivaldiHooks is a set of hooks/scripts for Vivaldi browser modding.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spatial navigation in Vivaldi, suggestion for alternative in VivaldiHooks?

Pathduck opened this issue · comments

Hey!
The spatial navigation in Vivaldi is pretty good, and one of the main reasons I use it. There was however a time when it was broken and I had to look for alternatives. I looked at Vimium but found it too complex. There's Crossfire but it's kind of lacking. Then I found this:
https://chrome.google.com/webstore/detail/spatial-navigation/gogippjaikoijhcdcioeajgpmlmchkba

It was such a major improvement over the standard navigation I've just kept using it. It has a great feature of Vimium-like link shortcuts for single-key navigation. I've made some minor changes to change keys to use WASD and F for "Following" links:
https://pastebin.com/igYwrvWC

However, it was last updated in 2015, and looks abandoned by the dev. I'm afraid it will some day just stop working, and I've been looking at the code to try to make some sense of it. But to be honest, my JS skills are not up to par, and the code is really a mess. Comments are in Japanese, it uses some library called "Lazychain" which seems overly complex, and lots of quirks like "LIBRALY" which I assume is just a misspelling of Library 😄

So I was thinking, maybe this would be a good addition to the hooks? It would need to be cleaned up of course, maybe even 90% of the code is redundant for all I know. I thought if you like fiddling with Javascript, maybe you can make sense of it? Maybe even create your own extension from it, since I don't think the original dev would care at all.

There's a repo, but there's no JS or anything I recognise from the actual extension. Is it C#?
https://github.com/falsandtru/spatial-navigation

The extension is just a single (but very large) JS file, best is probably to just install it from the store and look at the code in Extensions\gogippjaikoijhcdcioeajgpmlmchkba\0.4.7_1\dist\raw. Or look at the pastebin above, which is the same code a bit cleaned up by me.

This is only if it sounds like something you'd find interesting or would like to improve upon or make your own. It would be a great relief for me also to know the code is in the hands of someone who knows their stuff :)

here's a repo, but there's no JS

There are .ts files in "src" folder, so this is TypeScript.
js file and extension distribution may be built by using gruntjs.

I don't think I'll implement something similar in the nearest future.

Thanks for the reply. And no worries - I absolutely understand :)

Did you have a look at the source in the pastebin, did you make any sense of it at all? I'll try to get it cleaned up but a few pointers would help, like if the whole Lazychain bit is even used?

Isn't it better to modify original source code? I've managed to build it

npm install -g grunt-cli && npm install && npm install grunt --save-dev && npm audit fix --force && grunt dist --force

I don't think unused libraries would be there.

Yes, I managed to do that as well, after a bit of fiddling with Node. I'm not a JS developer and most of that build stuff is alien to me. I didn't even know you needed to "build" Javascript... new times I guess, new times :)

It does pull in the Lazychain stuff as a module and I have no idea how to dig in these "grunt" files for how to remove it, it would probably break without it anyway. It would be a lot of work I guess, so I'll leave it at that. It works for now at least :)

Thanks for your input though!