ghostery / ghostery-extension

Ghostery Browser Extension for Firefox, Chrome, Opera, Edge and Safari
Mozilla Public License 2.0
1.37k stars 139 forks source link

DNR feedback on Safari #1583

Closed smalluban closed 4 months ago

smalluban commented 4 months ago

From my testing, it looks like matched rules are only returned for blocked requests (rules can also match and allow requests). I assumed that this was right, so every matched rule is treated as if it was blocked.

smalluban commented 4 months ago

@chrmod Please reset to the new version of the branch if you want to work on this branch. I made a rebase to the current main.

philipp-classen commented 4 months ago

To fix the merge conflict: this is what has been added https://github.com/ghostery/ghostery-extension/commit/9e9f9620de3ab1483aa7f09e5f8efb8768b81c86

smalluban commented 4 months ago

@philipp-classen I Added config for Edge, please scan if it is right now - https://github.com/ghostery/ghostery-extension/pull/1583/files#diff-0077760dac31d77155faff549d98ea292441ec2f4f177fdd0ceee1d7620e4899R72

philipp-classen commented 4 months ago

@philipp-classen I Added config for Edge, please scan if it is right now - https://github.com/ghostery/ghostery-extension/pull/1583/files#diff-0077760dac31d77155faff549d98ea292441ec2f4f177fdd0ceee1d7620e4899R72

Looks good!

smalluban commented 4 months ago

@chrmod I think I made it as close to a 100% match as possible. The getMatchedRules must take a timestamp, as without it, it will return blocked requests for the previous page in the same tab.

Safari has a known bug, that if you pass the URL directly in the new tab (add tab and write URL) - then the onBeforeNavigate event is not triggered. Then, we use a message from the content script to set up stats. In this case and only, the timestamp will be "too late" - so some of the DNR feedback might be cut off.

@chrmod Please re-review.