Skip to content

Instantly share code, notes, and snippets.

@gausie
Created December 18, 2011 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gausie/1493182 to your computer and use it in GitHub Desktop.
Save gausie/1493182 to your computer and use it in GitHub Desktop.
Guardian App Avoider
// ==UserScript==
// @name Guardian App Avoider
// @namespace fbguardian
// @match *://*.facebook.com/*
// @author Samuel Gaus
// @description This userscript avoids Guardian links leading to the app on Facebook
// ==/UserScript==
var anchors = document.getElementsByTagName('a');
for(var i=0;i<anchors.length;i++){
var host = anchors[i].hostname;
if(host && ( (host == "www.guardian.co.uk") || (host == "guardian.co.uk") ) ){
anchors[i].onmousedown = null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment