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

Configuration example for autocontain #2463

Closed
Shurakai opened this issue Jun 7, 2020 · 5 comments
Closed

Configuration example for autocontain #2463

Shurakai opened this issue Jun 7, 2020 · 5 comments

Comments

@Shurakai
Copy link
Contributor

Shurakai commented Jun 7, 2020

Tridactyl version: 1.19.1pre3928-53d0d18
Firefox version: Mozilla Firefox 68.8.0
Operating system: linux

Hi,
I tried to get autocontain to work from my tridactylrc and it took me quite a long time.

When I look at the default config page of tridactyl, this is what I see:
autocontain: any = o({// "github.com": "microsoft",// "youtube.com": "google",})

When I search github for autocontain, some examples in people's tridactylrc included
autocontain youtu\.be youtube. There are even some comments in the code, but I only realized too late that this is for the :autocontain command.

Anyway, it took me quite some time to realize that I can configure it this way:
js tri.config.set("autocontain", "facebook\.com", "facebook")

I think it might be a good idea to add that somewhere in the documentation and maybe even to the tridactylrc that you guys ship as an example (in this repository).

Thanks for your work!

@bovine3dom
Copy link
Member

I don't quite understand this issue.

What's wrong with autocontain facebook\.com facebook?

Do you mean that we should document in :set that if you need to set a key with dots in you should use :js tri.config.set instead?

@Shurakai
Copy link
Contributor Author

Shurakai commented Jun 8, 2020

It didn't work for me, but I'm on an older version of tridactyl so I didn't report that as a bug.

Most lines in the config file start with "set ...", so I tried that in the beginning too. The config "example" autocontain: any = o({// "github.com": "microsoft",// "youtube.com": "google",}) that I found on the default config page also seemed to suggest that I should use set autocontain {"github.com" : "microsoft", "facebook.com" : "facebook"} but I received errors (not an object). Now I know that the "set" was wrong and the rest probably too, but it took me a long time to figure that out.

So I guess the main issue I had is that from looking at the code and the comments, it wasn't clear to me how to configure this. Setting the js tri.config. ... line as above just fixed everything for me. (I also had to set autocontainmode to relaxed or otherwise the container would always be removed, even when applied manually. I'll try this hopefully soon with a recent release when I can upgrade tridactyl, but I'm currently stuck with an older firefox-esr on Debian Testing. That's why I didn't report bugs for that.)

@bovine3dom
Copy link
Member

I'm currently stuck with an older firefox-esr on Debian Testing

We currently support FF68.x, the current ESR release, with mainstream Tridactyl, which is what is on the current Debian Testing - https://packages.debian.org/search?keywords=firefox-esr . So you shouldn't be stuck on an old version.

It didn't work for me, but I'm on an older version of tridactyl so I didn't report that as a bug.

autocontain hasn't really changed much since it was first added, so if there was a bug with it in an old version of Tridactyl there's probably a bug in the current version : )

@Shurakai
Copy link
Contributor Author

Shurakai commented Jun 8, 2020

Well, as stated in my first post, I'm on Tridactyl version: 1.19.1pre3928-53d0d18. I thought I had recently tried to upgrade but was told my FF is too old, but I guess I erred.

Maybe you still find time to add a note to the code saying explicitly how to configure this in the tridactylrc? It may save people some time and confusion.

Thanks for your time!

bovine3dom added a commit that referenced this issue Jun 8, 2020
@bovine3dom
Copy link
Member

Done :)

Sorry, I hadn't looked at the first post in this thread for a while. That's the latest version of Tridactyl. Please could you post a detailed issue about :autocontain? You may have been seeing #1409.

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