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

Enhancement: specifying the new tab page source via a tridactylrc directive #4961

Open
stupidcomputer opened this issue Apr 7, 2024 · 1 comment

Comments

@stupidcomputer
Copy link

Just a thought:

I remember when I used tridactyl that I wanted to set a new tab page to a local file, but I wasn't able to because of WebExtension limitations. I wonder if instead, tridactyl could inject the contents of the new tab page via the Native Messenger into the new tab environment. For example:

In the .config/tridactyl/tridactylrc:

set newtabpage_source = "~/.config/tridactyl/index.html"

and when a new tab page is requested, Tridactyl (the extension) requests the new tab page from the messenger and puts it as the new tab page, and then injects the page js for the extension functionality.

I'd be more than happy to provide a PR to this effect if there's enough people on board.

@bovine3dom
Copy link
Member

The best way to do this is to use e.g. caddy to host a local webserver and then set your new tab page in Firefox to e.g. http://localhost:8080/newtab.html. Anything we do in Tridactyl will probably take a few tenths of a second to load and therefore be a bit annoying.

If you really need a way to set your new tab page locally through Tridactyl, we should avoid reading from disk each time because that would be very slow. An approach like

:nativegrabnewtab path/to/html " reads path/to/html and stores in config
:set newtab magic_newtab_settting_to_be_renamed " reads newtab from config on newtab load

could work better. But it would still be worse than caddy.

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

No branches or pull requests

2 participants