HackerTrans
TopNewTrendsCommentsPastAskShowJobs

probablyrobert

no profile record

Submissions

Show HN: Glide, an extensible, keyboard-focused web browser

blog.craigie.dev
207 points·by probablyrobert·9 เดือนที่ผ่านมา·52 comments

comments

probablyrobert
·7 เดือนที่ผ่านมา·discuss
Shameless shill - I found Tridactyl and Vimium to be frustratingly limited due to the security restrictions imposed on web extensions, so I've been working on https://glide-browser.app/ for a while; It's a fork of Firefox with (some) vim motions and a TypeScript based config.
probablyrobert
·9 เดือนที่ผ่านมา·discuss
Thank you! I just implemented the ones I use the most, e.g. diw, but the motions system is still in very early stages and there are lots of motions I haven't implemented yet.

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.
probablyrobert
·9 เดือนที่ผ่านมา·discuss
I'm not entirely sure what is going to happen with imports to be honest. My current thinking is that they'll be supported eventually but that imported modules should not have access to glide APIs. For anything that does need to use glide APIs, I would support that through a separate API.

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.
probablyrobert
·9 เดือนที่ผ่านมา·discuss
DRM is not possible to support unfortunately: https://glide-browser.app/faq#why-can't-i-play-drm-content

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?

[0]: https://github.com/pomdtr/tweety

[1]: https://glide-browser.app/security
probablyrobert
·9 เดือนที่ผ่านมา·discuss
Ah not yet sadly - https://github.com/glide-browser/glide/discussions/3

I personally prefer non-smooth scrolling as it feels faster.
probablyrobert
·9 เดือนที่ผ่านมา·discuss
I'm not very familiar with Helix keybindings myself but if there are vim equivalents (and if they're actually implemented, a fair amount of mappings are missing right now) then you should be able to! There's a `motion` excmd you can use in your mappings.

I don't think it'll be possible to implement multi-cursor support through the config though unfortunately.
probablyrobert
·9 เดือนที่ผ่านมา·discuss
ah yeah sorry about that, the API docs aren't quite complete yet.

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...
probablyrobert
·9 เดือนที่ผ่านมา·discuss
oh that is very helpful, thanks for sharing :)
probablyrobert
·9 เดือนที่ผ่านมา·discuss
You can use CSS selectors already! https://glide-browser.app/hints#excmds

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...
probablyrobert
·9 เดือนที่ผ่านมา·discuss
Oh wow this is very cool, thank you for sharing!!
probablyrobert
·9 เดือนที่ผ่านมา·discuss
You can't configure extensions yet but you can set prefs! https://glide-browser.app/api#glide.prefs.set
probablyrobert
·9 เดือนที่ผ่านมา·discuss
Yes! All standard input elements have vim motions support but fair warning that a lot of the standard motions aren't implemented yet.
probablyrobert
·9 เดือนที่ผ่านมา·discuss
It's implemented as a set of patches + new files for net new files I add myself, then to build it, the firefox source is downloaded and patched automatically - so bumping the underlying firefox version is generally very easy.

I'm currently actually tracking the firefox beta channel because the frequent small updates are so easy to do.
probablyrobert
·9 เดือนที่ผ่านมา·discuss
Author here - happy to answer any questions :)
probablyrobert
·9 เดือนที่ผ่านมา·discuss
Currently the easiest way to pull over settings I'm aware of is to use Firefox Sync[0]. I haven't looked into other settings import solutions yet.

[0]: https://www.firefox.com/en-GB/features/sync/