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

Using regex in the Tab URL Input #21

Open
thmsgbrt opened this issue Apr 19, 2018 · 6 comments
Open

Using regex in the Tab URL Input #21

thmsgbrt opened this issue Apr 19, 2018 · 6 comments

Comments

@thmsgbrt
Copy link

Hi!
I think it would be a great idea to have the possibility of setting a regex as Tab URL.
I'm using Resource Overrides to match a set of URLs and as for now, I've to change the Tab URL when I want to match another page of a website.

Do you think it could be implemented ?

Thank you very much!
Thomas

@kylepaulsen
Copy link
Owner

I might look into it. As of now you can use *s to kinda help you do what you want but the result might be too "accepting". If you have a set of urls you want to match and they are not very similar, then yeah you'd either have to use just a single * or have a bunch of rules.

@thmsgbrt
Copy link
Author

ok, thanks for your answer 😄

@johnryan1982
Copy link

Hi @kylepaulsen , thanks for creating and maintaining this extension! I'm just starting to use it and think it's genius!

I have a similar use case to @thmsgbrt in that I would like to redirect a resource based on a URL parameter (eg. ://xyz.com//?...&theme=01 or ://xyz.com//?theme=01) and if I understand correctly, the current implementation means that I need to create a new URL rule for each both /?theme=* AND /?&theme= is this correct?

Either way, I still think that this feature would be useful, hence why I'm adding my +1.

Cheers

@thmsgbrt
Copy link
Author

Hey @johnryan1982,

I built a Chrome Extensions to replace a specific request by a link of your choice, maybe it can help you.
https://github.com/thmsgbrt/HTTP-Request-override

Bye!

@kylepaulsen
Copy link
Owner

kylepaulsen commented Sep 12, 2018

You could try something like

Match: *example.com*?*myparam=*

That would match if you are on example.com at some path with query param "myparam"

But if you wanted to be more generic maybe something like:

Match: *?*myParam=* 

Hopefully that helps...

@johnryan1982
Copy link

Thanks both for the feedback. I'll be looking into both options...

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

3 participants