Created
July 21, 2010 13:59
-
-
Save dtjohnso/484518 to your computer and use it in GitHub Desktop.
A Greasemonkey script for removing stuff I don't want from Google News
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove from Google News | |
// @namespace http://duncanandmeg.org | |
// @description Removes the "Google Fast Flip" section | |
// @include http://news.google.com/ | |
// ==/UserScript== | |
// Add jQuery | |
var GM_JQ = document.createElement('script'); | |
GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js'; | |
GM_JQ.type = 'text/javascript'; | |
document.getElementsByTagName('head')[0].appendChild(GM_JQ); | |
// All your GM code must be inside this function | |
function letsJQuery() { | |
//remove items from Google News page | |
//For the paranoid, like me | |
$("#rt-col").remove(); //whole right column | |
//Less extreme approach | |
//$("#rt-col > .gadget-iframe-contents").remove(); //Fast Flip | |
//$("#s_POPULAR > .contents").remove(); //Most popular | |
} | |
// Check if jQuery's loaded | |
function GM_wait() { | |
if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait,100); } | |
else { $ = unsafeWindow.jQuery; letsJQuery(); } | |
} | |
GM_wait(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment