containerise icon indicating copy to clipboard operation
containerise copied to clipboard

Feature Request: Change containers by specific URL instead of the domain only.

Open rtevans01 opened this issue 5 years ago • 11 comments

Title says it all. It would be nice if we could have more granular control. I often change my container based on the entire URL address. Thanks.

rtevans01 avatar Feb 12 '21 18:02 rtevans01

What have you tried? It should be already possible.

addons.mozilla.org/es/firefox , Shopping for example only containerizes URLs that start with that path while leaving the rest of addons.mozilla.org intact.

LoveIsGrief avatar Feb 12 '21 22:02 LoveIsGrief

It doesn't work when changing subreddits on Reddit.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Friday, February 12th, 2021 at 2:22 PM, LoveIsGrief [email protected] wrote:

What have you tried? It should be already possible.

addons.mozilla.org/es/firefox , Shopping for example only containerizes URLs that start with that path while leaving the rest of addons.mozilla.org intact.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rtevans01 avatar Feb 13 '21 20:02 rtevans01

Isn't the new Reddit SAP? Need to confirm if extensions can observe url changes via history api.

kintesh avatar Feb 20 '21 09:02 kintesh

What have you tried? It should be already possible.

addons.mozilla.org/es/firefox , Shopping for example only containerizes URLs that start with that path while leaving the rest of addons.mozilla.org intact.

Hello I hereby confirm this also isn't working on my side. I tried to add https://classroom.google.com/c/MjQ2NjYwODE4NDAx* as the link and save it, but it doesn't go to the container when I navigate to that link or even

*mjq2njywode4ndax* , STTS
*mjq2njywode4ndyx* , STTS

benyaminl avatar Feb 22 '21 02:02 benyaminl

@benyaminl the * aren't being interpreted in your rules. https://github.com/kintesh/containerise states this image

You will need to use e.g !*mjq2njywode4ndax* , STTS if you want * to work. Could you try it with that?

LoveIsGrief avatar Feb 27 '21 17:02 LoveIsGrief

@benyaminl the * aren't being interpreted in your rules. https://github.com/kintesh/containerise states this image

You will need to use e.g !*mjq2njywode4ndax* , STTS if you want * to work. Could you try it with that?

I tried. It stay on default container. Any other ways? image Only domain works. And the domain settings on addons settings are turned off image

using @+.MjQ2NjYwODE4NDAx also doesn't help with regex. Tested with regexr.com javascript. image

What have you tried? It should be already possible.

addons.mozilla.org/es/firefox , Shopping for example only containerizes URLs that start with that path while leaving the rest of addons.mozilla.org intact.

This also don't work with containerize

@.+mjq2njywode4ndax , STTS
https://classroom.google.com/u/0/c/mjq2njywode4ndax , STTS

EDIT : I found the root cause. MjQ2NjYwODE4NDAx is uppercase, and when we save it, it become lowercase, that should be the case. Does the CSV really need to be lowered? I think about it hm.. and JS doesn't support (?i) modifier. It only works directly on the regex class, we only could change using /gi at the end of it. https://regexr.com/5nh9d

because

@.+classroom.google.com.+

do work

benyaminl avatar Mar 01 '21 06:03 benyaminl

Hello, @LoveIsGrief could you reproduce based on my post before? The only resort for me now only adding some query param to make it work, as the regex is case sensitive.

so for that url that's case sensitive like https://classroom.google.com/u/0/c/MjQ2NjYwODE4NDAx, I add query param ?domain=stts.edu to https://classroom.google.com/u/0/c/MjQ2NjYwODE4NDAx?domain=stts.edu so it will trigger the containerise based on domain config

!*stts.edu, STTS

I think the regex selector should support case insensitive because when you save the config, you make it lowercase. maybe probably here(just guessing it) and make it /gi https://github.com/kintesh/containerise/blob/ec227436341fb761a7bdc51477085779e5c6373b/src/utils.js#L96-L99

Any reply regard this is appreciated thanks.

benyaminl avatar Mar 05 '21 01:03 benyaminl

@benyaminl it looks like you found the root cause. I don't contribute code to this project anymore as I maintain a fork to make more radical changes.

You can fork #125 which should contain the fix for this issue, which I wrote a long time ago, and test it to see if it fixes your issue.

LoveIsGrief avatar Mar 06 '21 13:03 LoveIsGrief

@benyaminl it looks like you found the root cause. I don't contribute code to this project anymore as I maintain a fork to make more radical changes.

You can fork #125 which should contain the fix for this issue, which I wrote a long time ago, and test it to see if it fixes your issue.

Seems yours working. I remove containerise. Thanks. It seems work decently. I give star.

benyaminl avatar Mar 06 '21 14:03 benyaminl

I too have run into issues where containerise isn't correctly handling mixed-case URLs in a regex. This breaks the ability for me to get certain URLs to open in specific containers.

It would be really nice if containerise wasn't automatically lower-casing everything in the regex when clicking "Save". If I typed in a capital letter in my regex, I want it to be there.

timmooney avatar Jun 12 '21 01:06 timmooney

I too have run into issues where containerise isn't correctly handling mixed-case URLs in a regex. This breaks the ability for me to get certain URLs to open in specific containers.

It would be really nice if containerise wasn't automatically lower-casing everything in the regex when clicking "Save". If I typed in a capital letter in my regex, I want it to be there.

For now I create a lowercase get/query param that make the containerise work.

Example https://classroom.google.com/u/0/c/MjQ2NjYwODE4NDAx

To

https://classroom.google.com/u/0/c/MjQ2NjYwODE4NDAx?domain=stts.edu so it will trigger the containerise based on domain config

for now it's the only way to make it work

benyaminl avatar Jun 12 '21 01:06 benyaminl