Content filters should be updated when the page is changed via the History API
Steps to reproduce
- Add a content filter to block all videos on youtube:
EWE.filters.add("youtube.com###player")
- Add a document exception filter to allow a specific video: `@@https://www.youtube.com/watch?v=Zcf-OcvT03Y|document`
- Go to https://www.youtube.com/watch?v=Zcf-OcvT03Y
- Navigate to a different page without reloading by clicking on another video
- Refresh the page
Observed behavior
- After 3. the video is shown
- After 4. the new video is shown
- After 5. the new video is hidden
Expected behavior
- After 3. the video is shown
- After 4. the new video is hidden
- After 5. the new video continues to be hidden
Further information
- The issue appears to be that, even though we observe the frame state when history API events happen, we don't update the active content filters.
- This problem will also apply to elementhideemulation filters, and snippets.
- See also related issue https://gitlab.com/eyeo/adblockplus/abpui/adblockplusui/-/issues/1037
Edited by Justin Wernick