kintesh / containerise

Firefox extension to automatically open websites in a container
MIT License
411 stars 55 forks source link

Support for not #94

Closed ispringle closed 4 years ago

ispringle commented 4 years ago

It would be great if there was a way to support a not. This would result in only opening github in this container and nothing else. If I try to open another link in the container it would force open in a new container or none. So for example I could have a config such as:


!*
*.github.com
LoveIsGrief commented 4 years ago

I believe #91 would solve that for you

OdinGitDat commented 4 years ago

Alternatively, you can use this rule that I prefer: @.* , No Container

ispringle commented 4 years ago

This works wonderfully @OdinGitDat. It works exactly as I had thought, opens in no container. Thanks!

Don't see a reason this needs to be worked on any further @LoveIsGrief. I can make a PR to update the documentation to highlight this though since it's probably useful to others.

LoveIsGrief commented 4 years ago

sure, go ahead @pard68

If it's a preference you want to document, you'll need to add the docUrl attribute to the preferences.json and a markdown file in docs/ui-preferences.
The code and webpack will take care of the rest.

Otherwise, I don't know how to add docs, but suggestions are welcome.

ispringle commented 4 years ago

Actually, this isn't working any longer. It keeps opening all sites in No Container now. Not sure what changed, other than @.* , No Container was at the bottom of my list and now, on save, it jumps to the top. I am assuming that it's reading from the top, finds a valid container and stops going any further.

Only difference between when I said it worked and when I didn't is I had tested it on a Windows machine initially and am now trying to get it working on my personal machine with is running Arch.

LoveIsGrief commented 4 years ago

@pard68 have you tried default containers yet? Check the extension preferences.

OdinGitDat commented 4 years ago

I noticed too, it works only if you use regex for all your filters because it takes preference over the other types of filters now. I'll put a snippet of my rules here as an example of how you can make it work again.

@.* , No Container
@.*(\.|\/)blogspot\.com\/.*$ , Google
@.*(\.|\/)facebook\..*\/.*$ , Facebook
@.*(\.|\/)fb\.com\/.*$ , Facebook
@.*(\.|\/)google\..*\/.*$ , Google
@.*(\.|\/)instagram\.com\/.*$ , Facebook
@.*(\.|\/)messenger\.com\/.*$ , Facebook
@.*(\.|\/)microsoft\..*\/.*$ , Microsoft
@.*(\.|\/)microsoftonline\.com\/.*$ , Microsoft
@.*(\.|\/)youtube\..*\/.*$ , Google
@.*(\.|\/)ytimg\.com\/.*$ , Google

And @LoveIsGrief, I want the default to be no container, and apparently I'm not the only one. Maybe you can adjust #91 so that the default container is no container.

LoveIsGrief commented 4 years ago

@OdinGitDat Just name it "No Container"

OdinGitDat commented 4 years ago

Thanks, that works. Guess my regex is obsolete than and this issue can be closed?

LoveIsGrief commented 4 years ago

No problem.

I'll close it. If @pard68 has a different opinion, I'll re-open.

P.S PRs for improving the documentation or defaults are welcome