Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common extension integration in favor of custom installation #385

Open
14 of 20 tasks
Jelmerro opened this issue Jun 23, 2022 · 18 comments
Open
14 of 20 tasks

Common extension integration in favor of custom installation #385

Jelmerro opened this issue Jun 23, 2022 · 18 comments
Labels
enhancement New feature or request

Comments

@Jelmerro
Copy link
Owner

Jelmerro commented Jun 23, 2022

Checklist

Addition or change

As had been the case for a few years, extension support in Electron isn't good, neither is the support in Vieb. For this reason, I propose to deprecate and remove the current extension support in favor of integrating commonly requested features into Vieb without the need for an extension. The current list of extensions (or features of said extensions) that are considered are:

  • Darkreader (see :help darkreader)
  • Sponsorblock (see :help sponsorblock)
  • Password manager, see Implement a password manager #106
  • Greasemonkey and userscripts (see Add greasemonkey script support #64 and :help userscript)
  • Stylus or similar (to apply custom styling to a page, see :help userstyle)
    • Scrollbar customization of some sort (see :help userstyle and :help guiscrollbar)
    • Scrolling behavior controlled with scroll-behavior and scroll-snap-type
  • Built-in dictionary (as in, show the definition of a word, not just correct misspelled ones, possibly with Anki integration)
  • Word replacer (replace random words on the page with different language words with definition, as to learn languages)
  • Page translator (see :help :translatepage)
  • Text-to-speech, read pages or section of it (selected with visual) out loud
  • Automatic clearing of cookies, localstorage and cache, based on a timer and/or domain name
  • Bookmarks Add special page for managing and tagging bookmarks #100
  • Markdown viewer (as suggested by @Melandel, see :help toggleMarkdownViewer)
  • Script blocking functionality (see Feature Request: Javascript enable/disable #264 and :help resourcetypes)
  • Edit request headers with list setting (override built-in ones or add custom ones, see :help requestheaders)
  • Copy RSS feed urls (as suggested and implemented by @saltrafael, see :help pageRSSLinksList)

All of these should be OPTIONALLY activated, as is already the case for the ones that are marked as done. Please feel free to suggest additional extensions/features you use often and for which there is no existing way to do so in Vieb, either in the comments below or as a new ticket.

Alternatives considered

An alternative to the above scenario would be to create and support browser extensions, but please DO NOT underestimate this task. I have tried and failed for years, as have many others. The enormous size of this task is what led to the deprecation of extension support in the first place. If you think you are up for the task, please go ahead: write the code and make a PR for it, but until then, know that building optional features into Vieb will be the current way forward. For info about the previous extension approach, see #130.

@Jelmerro Jelmerro added the enhancement New feature or request label Jun 23, 2022
@Jelmerro Jelmerro pinned this issue Jun 23, 2022
@yosoymau
Copy link
Contributor

yosoymau commented Jul 4, 2022

Something that would be very nice to have related to the word translator and builtiin dictionary would be integration with anki, like the way yomichan on firefox has.

@Melandel
Copy link

I would definitely enjoy a markdown viewer.

Example on firefox: markdown-viewer-webext

@rafael-xmr

This comment was marked as resolved.

@Jelmerro
Copy link
Owner Author

That seems like it is already possible with the redirects setting, so not adding to the list for now.

@Nosp1
Copy link

Nosp1 commented Mar 31, 2023

Hi, I've just discovered the browser, and I'm in love! But I need Modheader plugin for day to day development for injecting certain env variables in the http requests. As I've just discovered this browser i'm not sure if you already support this, but It could be a great feature to integrate (if at all possible).

(I do apologise if my comment here is out of place)

@Jelmerro
Copy link
Owner Author

This seems like a nice addition, would you need multiple profiles with filters, or would a general method to edit the request headers be enough? And if not, how should we organize the config?

@Nosp1
Copy link

Nosp1 commented Apr 1, 2023

Thanks for the quick reply and positive onlook. I use about three modheaders at the same time.So perhaps a simple way to toggle them on and off. Here is an example from the extension:
image.
It might be difficult to implement, I havn't had the time to look at the source code for Vieb yet.
It may be more feasible with a config file with simple key-value pairs. Or maybe one could use the command mode and do something in lines of set modheader <key> <value> and a command for clearing a mod header.
set modheader <blank> to clear all mod headers or unset modheader <key> to clear a single one. I think at least being able to have several would be convenient.

In regards to filtering and profiles they would be nice to have, but currently I only need one profile, and filtering has not been a need of mine, but maybe some other users might.

@Jelmerro
Copy link
Owner Author

Jelmerro commented Apr 3, 2023

@Nosp1 Implemented, will land in the upcoming 10.0.0 release, see faf9ca4.

@Nosp1
Copy link

Nosp1 commented Apr 3, 2023

Wow, thats great! Then I can use the browser at work! Awsome!

@rafael-xmr

This comment was marked as resolved.

@Jelmerro
Copy link
Owner Author

Looked at this briefly, and while it does seem cool and useful to add, the example extension sends every request to the "api url", which is hosted by the owner of the extension, where the logic for extracting the feed urls is abstracted away. This is both a security issue and cannot be used as an example of how to implement this. I would accept contributions to implement client-side feed url extraction, but sending the url to a server to get a list of feed urls seems illogical and overcomplex. Since I have never used RSS in my life for anything, I will not be working on this personally, but I do accept PRs that implement this (again, if parsing of the page is done client-side in Vieb, not sending every url to a server like the extension linked).

@moneylcj
Copy link

moneylcj commented Aug 4, 2023

Is it possible to add the ability to access vieb internal resources and execute
commands from runjsinpage, just like vimperator liberator.execute did. This will open a new
door for users to customize plugins.

@Jelmerro
Copy link
Owner Author

Jelmerro commented Aug 7, 2023

Not currently, but that is tracked in this ticket #192, so please continue discussion for such a feature there.

@r3k2
Copy link

r3k2 commented Oct 15, 2023

something like libredirect https://libredirect.github.io/ I know vieb has set redirect but is limited in comparation with this one I point out..

ALSO: please gemini/gopher support will be great

@Jelmerro
Copy link
Owner Author

Redirects in Vieb are less easy to configure, but absolutely more powerful than regular redirect libraries, as you get complete freedom to change any url to a completely different url. While not directly aimed at replacing services with a different (possibly compatible instance) of it, with the right replacement patterns you can achieve the same functionality, but also for custom redirects or configs.

@prescientmoon
Copy link

prescientmoon commented Jan 16, 2024

People use many external password managers. Is the goal to bake in integration for all of them?

@Jelmerro
Copy link
Owner Author

Not exactly, but since extension support is pretty much impossible (as per #130), the current approach is to integrate the functionality of extensions for regular feature requests. For password management, there is a separate ticket that should ideally have custom integration with any password manager, see #106.

@IdoEsports
Copy link

Would a vim client in the browser like in firenvim be possible in Vieb?

I know of the vimcommand setting but I think most people would prefer the above method if it's possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants