atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.87k stars 413 forks source link

Need for WebExtensions? #2875

Open Ambrevar opened 1 year ago

Ambrevar commented 1 year ago

After playing with Firefox extensions the other day, I realized that

So...

  1. We should conduct a survey + have a look at the most popular extensions.
  2. If the conclusion is that extensions are used mostly for Adblocking, then, maybe it would wiser to focus on our own implementation of uBlock origin instead of implementing WebExtension support. After all, it would certainly be easier! :p Of course we would add some some automatic updater for the rules.
Ambrevar commented 1 year ago

I do not mean by this to drop WebExtensions altogether, but that dropping it for 3.0 might still make it possible for us to overpower blocker-mode to the level of uBlock, which would fix one of Nyxt's biggest flaws and would make us way less dependable on WebExtension support.

aadcg commented 1 year ago

I think the benefit of pursuing WebExtension support is mainly psychological, not functional. If we have it in place, then Nyxt stands as a good citizen in the browser's space and their interoperability.

Say that, functionally, we provide all of the features of a popular extension like uBlock origin. Still, psychologically, it's radically different. People tend to think in terms of what they could lose, and not in terms of potential gains. It's easier for users to take familiar extensions to a new browser, than having to learn how to use an analog.


I agree with you:

aartaka commented 1 year ago

Yes, adblocking matters. But the exact implementation (uBlock (Origin), AdBlock (+) etc.) doesn't, if it's good enough. Much like qutebrowser became less dependent on WebExtensions support with the addition of Brave Rust adblocker, we ourselves can

So yes, if we don't have WebExtensions, we may still cover lots of cases for these with user scripts (#2813) and proper rule parsing in blocker-mode

peterhoeg commented 1 year ago

Most of the firefox addons I use could be easily rewritten in CL for nyxt. I'm assuming that would be the case for many (most?) addons, so the question then becomes: is it more work to provide WE3 support than it is to rewrite all those plugins for nyxt?

The point about the psychological impact of having no WE support is valid, but I think should be left out from the "calculation" above.

Additionally, I'm a huge fan the of multi-account-containers/temporary-containers addons (not having the former of the 2 is a deal-breaker for my use cases). Does nyxt even provide the foundation that would allow for something that either via the hypothetical WE support or through a nyxt-native plugin?

FWIW, I'm very much cheering for nyxt to succeed!!

aartaka commented 1 year ago

Additionally, I'm a huge fan the of multi-account-containers/temporary-containers addons (not having the former of the 2 is a deal-breaker for my use cases). Does nyxt even provide the foundation that would allow for something that either via the hypothetical WE support or through a nyxt-native plugin?

That is possible with "contexts" that we already have. See make-buffer-with-context command. The API is somewhat under-developed, but we're in the process of rethinking it. See #2812 for the discussion.

Ambrevar commented 1 year ago

Additionally, I'm a huge fan the of multi-account-containers/temporary-containers addons (not having the former of the 2 is a deal-breaker for my use cases). Does nyxt even provide the foundation that would allow for something that either via the hypothetical WE support or through a nyxt-native plugin?

Nyxt core is already designed around these ideas. (See WebKit contexts and profiles.) It's mostly the user-facing interface that's lacking, but there are some examples that are avilable out of the box, see nosave buffers for instance.

lansingthomas commented 1 year ago

We should conduct a survey + have a look at the most popular extensions.

@Ambrevar -- I might be able to help. what precisely is the central question you want answered? {perhaps: which web extensions prevent nyxt adoption, which web extensions are people excited to build in CLOS/nyxt, which web extensions are... }

aadcg commented 1 year ago

Perhaps "which web extension are you missing the most in Nyxt?". From the answers we can extract the kind of functionality people are missing out.

Ambrevar commented 1 year ago

Agreed.

CorruptedVor commented 1 year ago

on the topic of another implementation of ublock-origin: one could base this off nx-router, but the repo seems to be gone, I still have a clone

Ambrevar commented 1 year ago

Mind sharing this clone somewhere? (E.g. GitHub)

aartaka commented 1 year ago

on the topic of another implementation of ublock-origin: one could base this off nx-router, but the repo seems to be gone, I still have a clone

It's not gone, just moved to Sourcehut: https://git.sr.ht/~conses/nx-router

Ambrevar commented 1 year ago

Dead link :(

CorruptedVor commented 1 year ago

on the topic of another implementation of ublock-origin: one could base this off nx-router, but the repo seems to be gone, I still have a clone

It's not gone, just moved to Sourcehut: https://git.sr.ht/~conses/nx-router

indeed it isn't, https://git.sr.ht/~mmoreno/nx-router

As far as I can tell it can block/redirect/etc by

Afaik, regex is the essential part as ublock also does that.

ghost commented 1 year ago

@CorruptedVor Hi, I'm the author of nx-router. The extension is more geared towards being a convenient way to define resource handlers like redirects (think url-dispatching-handler but more elaborate), and under the hood, it uses the same API that blocker-mode does, so IMO the effort should be directed towards improving that

jorisvandijk commented 1 year ago

Unsure if there's indeed a survey yet, but would love to take it.

In my opinion extensions are a must for any modern web browser. They extend the capabilities of a browser immensely and improve your web experience. For example, host based ad blocking does not block YouTube ads, nor does it block sponsored segments. Auto agreeing to cookies is also something I'd consider a must have. I'm sure there are other must-haves for other people and I'd strongly would push for extension support. It is the only thing that is keeping me from using Nyxt as my main browser right now.

I don't know any Lisp, but willing to learn or help in any other way to help make this a reality. :)

Ambrevar commented 1 year ago

@jorisvandijk To clarify, the point of the original post is that if we (ever) get blocker-mode on par with, say, uBlock Origin, then the need to support the WebExtension standard (so extensions that run on Firefox, Chrome, etc.) becomes much less relevant.

Auto-accepting cookies could also be done in pure-Lisp.

Fenlair commented 1 year ago

I used to use Nyxt(Next) for a short while, but the lack of privacy features deterred me from staying on it. There exist a whole slew of add-ons in Firefox to regain a modicum of privacy. DecentralEyes, ClearURL, PrivacyBadger or CanvasBlocker to name a few. Without tease I feel like I would sacrifice too much privacy for a better UI.

These add-ons are also all recommended by Firefox, so they get vetted to some extent. If all these features were rebuilt in CL, there would still be the issue of trust - who has time to check browser plugin updates themselves?

Firefox also has a lot of built-in settings - like separated cookies per domain - that are immensely important for privacy.

I really like this project, but I feel for anyone marginally interested in privacy, Nyxt isn't daily drivable.

CorruptedVor commented 1 year ago

You have to keep in mind that merely having js enabled already puts your privacy at risk. See https://coveryourtracks.eff.org/ for terms to look up and text to read. As far as I know, no browser mitigates this effectively[1] while having js enabled, but I don't know every browser's js engine.

Edit: [1] It's subjective what you consider to be effective, here is eff's take: https://coveryourtracks.eff.org/about

Fenlair commented 1 year ago

DecentralEyes helps against the super broadly used js libraries from google or cloudflare. PrivacyBadger helps as well. Also JS libraries aren't the only cross-site tracking mechanism. Containerize cookies per domain help, CanvasBlocker helps against fingerprinting, ClearURL helps against jump links. I'm not claiming Firefox or any other browser has the perfect blend of privacy and usability (because just disabling js is a huge pain) - but there are a lot of vetted libraries to alleviate the privacy issue.

Also, I would miss SponsorBlock D:

timthelion commented 1 year ago

For me ublock is pretty important and it would be enough. But I also use "EasyScreenshot" every day which allows me to take full page screenshots including out of scroll content, as well as midnight lizard which allows me to use dark mode on pages that don't support it. Other than that, obviously things like surfkeys aren't necessary in nyxt :)

Ambrevar commented 1 year ago

Firefox also has a lot of built-in settings - like separated cookies per domain - that are immensely important for privacy.

Nyxt supports this.

aartaka commented 1 year ago

But I also use "EasyScreenshot" every day which allows me to take full page screenshots including out of scroll content, as well as

I'm pretty sure that WebKit has some API for that. We don't have it bound/implemented yet, though.

midnight lizard which allows me to use dark mode on pages that don't support it.

You might want to check out https://github.com/aartaka/nx-dark-reader :)

Fenlair commented 1 year ago

I want to emphasize that there are two separate advantages for foreign extensions: 1) Getting crucial functionality, that is difficult to replicate, e.g. complicated privacy techniques. 2) Outsourcing vetting of such extensions.

Some elaboration on the second point: Extensions that aren't easily replicated come with complexity, that can't easily be vetted by everyone. I for myself, don't install extensions in Firefox which aren't recommended by Mozilla - I don't have the time to read through every extension and I wouldn't want to install any extensions without some level of quality control. Being able to pull in extensions from a major browser would allow tapping into their quality control system.

I wouldn't surf the modern internet without web extensions, even if I had to give up a sane UI for it. But that's just my personal opinion.

jmercouris commented 1 year ago

A very interesting angle we hadn't adequately evaluated. Thank you @Fenlair , will ponder on this!

peterhoeg commented 1 year ago

It’s probably also fairly safe to assume that the target audience for nyxt are predominantly firefox users today. Of those users, we can also assume that the majority will be using one or more addons. At least one of those addons is bound to provide functionality that when not available on nyxt will be a deal-breaker.

I really, really want to move to nyxt but presently I am depending on a number of firefox addons that I simply will not operate a browser without. The web has become an unbelievable shit-show without (IMHO).

danilevy1212 commented 1 year ago

I want to echo @peterhoeg last sentence, for me this feature is the only thing that is keeping me from moving on to nyxt. As much as I am attracted to a fully hackable browser, I don't have the time (and arguably the skill :laughing: ) to replicate all the extensions that I consider essential in common-lisp. I do wonder how many more people have similar feelings.

xbc5 commented 1 year ago

You have to keep in mind that merely having js enabled already puts your privacy at risk. See https://coveryourtracks.eff.org/ for terms to look up and text to read. As far as I know, no browser mitigates this effectively[1] while having js enabled, but I don't know every browser's js engine.

Edit: [1] It's subjective what you consider to be effective, here is eff's take: https://coveryourtracks.eff.org/about

A plain-text reader mode would be awesome. Like the reader mode in Firefox, but without the "save-do-disk" feature; also an always on feature. You'd only have to grab the text from p tags etc.

Web-Ext support is why I stay on Firefox. They also have other features. Isn't Nyxt suppose to be engine agnostic? Forgive my ignorance, but where about in the "model" do these features lie -- if you supported the Firefox "engine", does that include other "backend" features like Web-Ext, or special cookie management features?

I've always thought Firefox would be perfect if someone just rewrote the UI with a native Vim (or Emacs+Evil) mode for everything, and native plugins.

CorruptedVor commented 1 year ago

So far, it seems people want extensions beyond ad-block.

A similar situation to Xorg -> Wayland - one should switch, but do not break stuff and make people rewrite their stuff. In that sense it's a negative example, because you can't re-use application code written for Xorg as-is. Tl;dr huge backlash, and it's still going.

wanderer commented 1 year ago

Any progress on the survay?

aadcg commented 1 year ago

@wanderer web extension will be supported!

ghost commented 11 months ago

Just thinking out loud here, but I wonder how will Chrome's manifest v3 affect the potential extensions that will be supported on the Electron port, most notably UBlock Origin so that the efforts aren't in vain.

aartaka commented 11 months ago

Update on WebKitGTK extension support: we're focusing on Electron port right now, so the date of WebExtensions support on WebKitGTK port is uncertain.

glyh commented 3 weeks ago

Hello, I did not intend to be annoying here. But I just checked web extension support is migrated out to a library called https://github.com/atlas-engineer/libwebextensions and then abandoned, may I know what happened?

aadcg commented 3 weeks ago

@glyh, the README provides a good short description:

Note December 2023: The library is abandoned due to Nyxt team changing priorities. It’s incomplete. But should be possible to make it work, given enough work.

We're focusing on #2989 since it will allow running Nyxt on macOS and support WebExtensions.