kylepaulsen / ResourceOverride

An extension to help you gain full control of any website by redirecting traffic, replacing, editing, or inserting new content.
MIT License
467 stars 117 forks source link

Using regex in the Tab URL Input #21

Open thmsgbrt opened 6 years ago

thmsgbrt commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

ok, thanks for your answer 😄

johnryan1982 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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