Outbrain redirect links on tons of News websites.

in Ideas and script requests
Subscribe to Outbrain redirect links on tons of News websites. 8 posts, 4 voices



BF98 Scriptwright
FirefoxWindows

http://www.usatoday.com/sports/football/nfl/sai...

Fore example on the page above under article and above comments we can see Ountbrain block of "related" links. If you just hold a mouse over link(except first one) you can see destination. But it you click on the link you will see something like ones below.

http://paid.outbrain.com/network/redir?key=96a7...

http://traffic.outbrain.com/network/redir?key=b...

Is it possible to remove these redirects? thanks.

 
Jefferson Scher Scriptwright
FirefoxWindows

Do you have to be logged in to see this? I can't seem to trigger it just clicking around. Of course, I run NoScript with only about half the domains allowed (I did allow outbrain.com) so that could explain why I'm not seeing this. Could also be related to stored information (e.g., cookie or local storage) about how much you use the site...

 
Vivre Scriptwright
FirefoxX11

I don't see them either - but saw the page-source includes an 'Outbrain.js' call for link-events and I found outbrain being blocked by Ghostery (FF-addon).

 
BF98 Scriptwright
FirefoxWindows

No. You do not have to be logged in. It is in blocks of "More from USATODAY" and "More from the web" links usually under the article. Real links are there, but if you click on link it activate "onmousedown="this.href=" element and replace link with redirect from Outbrain.com or from nrelate.com for some other websites.

I am trying to post sample but it does not seem to work. Anyway if you try to view source for the blocks I mentioned you will find it.

 
drsr Scriptwright
ChromeWindows

The Outbrain.js script adds some onMouseDown events to the links so you would have to remove those events, but the links are generated by the Outbrain script after page load so you can't just do that from a userscript, you will have to use a DOM change listener so you can catch the changes the outbrain.js script makes, as in this example: http://stackoverflow.com/questions/3042264/its-...

 
Jefferson Scher Scriptwright
FirefoxWindows

Sorry, didn't scroll down that far. Try this:

// ==UserScript==
// @name           Strip Mousedown
// @namespace      YourNameHere
// @include        http://www.usatoday.com/*
// ==/UserScript==

function cleanLinks(e){
  if (document.querySelector('div.OUTBRAIN')) {
    var aels = document.querySelectorAll('div.OUTBRAIN a');
    if (aels.length == 0) {
      t = window.setTimeout(cleanLinks, 500);
    } else {
      for (var i=0; i<aels.length; i++) {
        aels[i].setAttribute("onmousedown", "");
        aels[i].onmousedown = "";
      }    
    }
  } else {
    t = window.setTimeout(cleanLinks, 500);
  }
}
var t = window.setTimeout(cleanLinks, 500);

Note: Since you probably don't scroll down to the bottom of the page right away, you could increase the delay from half a second (500) to a couple seconds (2000) on that last line if you like.

 
BF98 Scriptwright
FirefoxWindows

Script does not work. I talked to developer of one Firefox extensions and he said he will try to implement this feature in a few months.

 
Jefferson Scher Scriptwright
FirefoxWindows

BF98 wrote:
Script does not work.
Works for me. Did you get any errors in the console? Ctrl+Shift+j to display. Click Clear, reload the page, use the Error button to filter out style warnings. I probably can't replicate your experience exactly due to the personalized advertising. (Which I don't see because I'm using NoScript.)