tumpio / requestcontrol

A Firefox extension
https://addons.mozilla.org/addon/requestcontrol
Mozilla Public License 2.0
173 stars 25 forks source link

Redirection based on history state type #118

Open in4u opened 4 years ago

in4u commented 4 years ago

For some sites like Twitter, Instagram, etc. the redirection does not work as intended.

Steps to reproduce the problem

  1. Setup any rule to redirect https://twitter.com/*/status/* to https://nitter.net/*/status/*.
  2. Visit https://twitter.com/twitter or any other user page.
  3. Click on one of the status posts to view it and notice that the redirection does NOT happen despite the URL change in address bar.
  4. Click on the address bar and press enter for the redirection to actually occur.

Exact same problem happens on Instagram also when any rule for redirecting https://www.instagram.com/p/*/ to https://www.bibliogram.art/p/*/ fails on clicking a post on https://www.instagram.com/instagram/ or any other user page. For the redirection to actually occur, it's required to click on the address bar and press enter.

Redirector addon has this HistoryState option which can be used as a type for redirection rule. That overcomes this problem and the redirection works as intended there.

Am not sure if Request Control has a similar or equivalent option. I have even tried the Any type option while setting up the rules but it just doesn't work. Let me know if I am missing something otherwise please consider this as a feature request.

tumpio commented 4 years ago

This is not supported currently. Request Control doesn't listen history state changes, only new requests which can be modified.