Ooker
Ooker

Reputation: 3002

How to change domain on links but preserve the path?

I want to redirect the link from facebook.com/abcdef to m.facebook.com/abcdef via userscript.

Using:

Upvotes: 0

Views: 437

Answers (1)

Pinke Helga
Pinke Helga

Reputation: 6682

Most likely the meta include rules of your user script match https://m.facebook.* as well. Thus the user script is started after every redirection again.

Just exclude https://m.facebook.* from your rules or use a more specific needle in your invocation of the replace method, e.g. replace 'https://facebook.' by 'https://m.facebook.'.

Upvotes: 1

Related Questions