Show HN: Glide, an extensible, keyboard-focused web browser
blog.craigie.dev0: https://ba.ln.ea.cx/src/marsironpi/dotfiles/tree/common/.vim...
I've used it to add keymappings so that hints only apply to certain kinds of buttons on a page, e.g. https://github.com/RobertCraigie/dotfiles/blob/ecfd6f66e8a77...
I'd recommend just looking at the glide.d.ts[0], it should be pretty readable (I hope).
Yes the TS API supports it as well with the `selector` property:
``` glide.hints.show({ selector: "..." }); ```
> Also, would you consider making it return a promise instead of taking a callback? I think that would be more ergonomic.
The reason it doesn't return a Promise directly is because the hints that are generated are not static, try scrolling while hints are active and you'll see them refresh.
So the return type would have to be something else to work well with this functionality imo.
[0]: https://github.com/glide-browser/glide/blob/8171c5c2af000b71...
I don't think it'll be possible to implement multi-cursor support through the config though unfortunately.
Is RPC from external processes possible with this? For example, calling the URL of the open tab, or a list of open tabs and their URLs and/or content? Or remote control a tab, navigating to other URLs, etc? This would be interesting for integrating it with other apps and scripts, and Firefox is somewhat lacking in that field.
How secure is this?
Firefox Sync does work!
RPC is not currently supported but I agree it would be pretty interesting, tweety[0] was recently shared with me and that looks like it'd be quite nice, although I haven't tried it yet.
So far the only divergence from Firefox that could impact security is evaluating the config file, so I've described how that is sandboxed in the security[1] docs but I'm not super happy with the contents of that docs page; anything else you'd like to see mentioned?
Also, what about 3rd-partys? Can other webextensions access glides functions? Or even worse, websites? I guess this is prevented by Firefox itself, but explaining this more explicitly might be also an enhancement for the security-doc.
Yes eval is blocked, and extensions / websites cannot access glide APIs.
Thanks that is very helpful! Agree those things should be mentioned in the security doc.
I do plan on implementing as many motions as is feasible, but there are some intentional differences, e.g. `f` is used for hints instead of jump-to-char.
I'm currently actually tracking the firefox beta channel because the frequent small updates are so easy to do.
I have been using Vimium[1] on Chrome which works ok.
1. https://chromewebstore.google.com/detail/vimium/dbepggeogbai...
1. https://freeimage.host/i/KMQu3EQ 2. https://freeimage.host/i/KMQAJ9t
with glide you can also make keymaps:
glide.keymaps.set("normal", "gd", () => openOrFocus("docs.google.com/document", "https://docs.google.com"), { description: "Go Docs" });
so i can close a tab quickly in normal mode using: tx. then hit gd to open google docs as an example.
i do have a hidden bookmarks bar with a ton of junk and sites i rarely open, but it is there if i need to find something.
Sorry if the questions are a little much; as a tab hoarder I'm always curious when productive people make do with small numbers of tabs.
for comparative work i use split tabs and for document skimming i use reader mode + anytime i feel overwhelmed i will start saving things to pocket to skim or search through later.
Nice to see Firefox forks too this is a really interesting concept, As a use-vim-everywhere kind of user, I absolutely need to try this out.
I personally prefer non-smooth scrolling as it feels faster.
Cool. My first thought was that this should be an extension, rather than a separate browser. Of course that's covered in TFA, modern extensions are just not allowed to have the necessary access.
I get the "oh no security" arguments about letting random shit from Chrome Web Store have free reign over the browser, but what if I trust the extension publisher and am willing to assume responsibility for my own actions, data, and computer?
For anyone wanting to stick to stock Firefox ESR, I highly recommend checking out VimFX.
0: https://github.com/akhodakivskiy/VimFx
The big downside of VimFX compared to Glide is lack of Firefox internal API documentation. I've had to dig through Firefox source code several times to find out how to do things e.g. wrangle tabs that would have been easy to do with the WebExtensions APIs. The fact that Glide makes these APIs available in the config file is the part I'm most excited about.