Skip to content

Instantly share code, notes, and snippets.

@colingourlay
Created August 2, 2010 01:44
Show Gist options
  • Save colingourlay/504000 to your computer and use it in GitHub Desktop.
Save colingourlay/504000 to your computer and use it in GitHub Desktop.
(function() {
if (typeof jQuery != 'undefined') {
return run();
} else {
function getScript(url, callback) {
var script = document.createElement('script');
script.src = url;
var head = document.getElementsByTagName('head')[0],
done = false;
script.onload = script.onreadystatechange = function() {
if (!done && (!this.readyState
|| this.readyState == 'loaded'
|| this.readyState == 'complete')) {
done = true;
callback();
script.onload = script.onreadystatechange = null;
head.removeChild(script);
}
};
head.appendChild(script);
}
getScript('http://code.jquery.com/jquery-latest.min.js', function () {
return run();
});
}
function run() {
if (typeof jQuery != 'undefined') {
$jq = jQuery.noConflict();
$jq('#banner').remove();
$jq('#mainnav').remove();
$jq('#ctxnav').remove();
$jq('#prefs').remove();
$jq('#altlinks').remove();
$jq('#footer').remove();
$jq('dt').each(function () {
if ($jq(this).find(':contains("cgourlay")').length == 0) {
$jq(this).next().remove();
} else {
$jq(this).next().css('font-size','120%');
}
$jq(this).remove();
});
$jq('dd.wiki').remove();
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment