Decloak links and open directly

Open redirected/cloaked links directly

Version au 24/01/2015. Voir la dernière version.

// ==UserScript==
// @name          Decloak links and open directly
// @description   Open redirected/cloaked links directly
// @version       1.0.2
// @author        wOxxOm
// @namespace     wOxxOm.scripts
// @icon          https://i.imgur.com/cfmXJHv.png
// @license       MIT License
// @grant         none
// ==/UserScript==

window.addEventListener('mousedown', function(e) {
  for (var a = e.target; a.localName != 'a'; a = a.parentNode)
    if (!a.parentNode)
      return;
  var m = a.href.match(/.+?(https?(?:%3[Aa]%2[Ff]%2[Ff]|:\/\/).+)$/);
  if (m) {
    a.href = decodeURIComponent(m[1]);
    console.log('De-anonymized: ' + a.href);
  }  
});