privacybadger icon indicating copy to clipboard operation
privacybadger copied to clipboard

google.* and link blanker extension

Open urfausto opened this issue 5 years ago • 4 comments

Hi, since i've installed this extension the behaviour of tabs opening on google.* went broken. i use link blanker to automatically open links in a new tab (https://chrome.google.com/webstore/detail/link-blanker/lkafdfakakndhpcpccjnclopfncckhfn). disabling this extension makes the behaviour become normal again, but upon activating it reappears. in short what happens is that it does not let me anymore open links in new tabs as instructed by the link blanker but will open them in the current tab instead. it is weird because on other sites everything seems to work normally.

urfausto avatar Feb 04 '20 12:02 urfausto

i'm on vivaldi browser (chromium) x64, latest release.

urfausto avatar Feb 04 '20 12:02 urfausto

Sounds like this may be caused somehow by Privacy Badger's Google link tracking protection (as that protection is only active on google.com domains).

@ablanathtanalba Could you take a look?

ghostwords avatar Feb 04 '20 15:02 ghostwords

This is indeed caused by the link tracking protection that Privacy Badger offers, specifically at these two lines in the code where Privacy Badger blocks event listeners on links in a google domain. I suspect that the Link Blanker extension adds event listeners on all links, so it only applies the target=__blank attribute to a link when the click or mousedown event fires.

Since the attributes on google links are still being pared down to only the bare essentials, I think that link tracking protection would still be effective without those two lines, though I'll need to do some more research to confirm. If that's the case, this PR will take care of it.

ablanathtanalba avatar Apr 27 '20 16:04 ablanathtanalba

An update to the experiments I tried in #2595 : The two lines of code that cause this breakage are also needed to prevent outgoing link tracking protection on google search results pages. As far as I was able to find, there isn't a way to pass exception to the code run by LinkBlanker while also preventing the tracking Google does on those links. I'll keep an eye on the behavior of those search results links to see if anything changes there that would allow us to solve this issue.

ablanathtanalba avatar Jul 20 '20 17:07 ablanathtanalba