Created
December 2, 2011 09:53
-
-
Save samstarling/1422580 to your computer and use it in GitHub Desktop.
Greasemonkey Hudson
This file contains hidden or 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 Olympic Screen | |
// @namespace http://bbc.co.uk | |
// @include https://ci-app.int.bbc.co.uk/hudson/view/Olympics%202012%20Data%20Screen/ | |
// ==/UserScript== | |
var $; | |
// Add jQuery | |
(function(){ | |
if (typeof unsafeWindow.jQuery == 'undefined') { | |
var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement, | |
GM_JQ = document.createElement('script'); | |
GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; | |
GM_JQ.type = 'text/javascript'; | |
GM_JQ.async = true; | |
GM_Head.insertBefore(GM_JQ, GM_Head.firstChild); | |
} | |
GM_wait(); | |
})(); | |
// Check if jQuery's loaded | |
function GM_wait() { | |
if (typeof unsafeWindow.jQuery == 'undefined') { | |
window.setTimeout(GM_wait, 100); | |
} else { | |
$ = unsafeWindow.jQuery.noConflict(true); | |
letsJQuery(); | |
} | |
} | |
// All your GM code must be inside this function | |
function letsJQuery() { | |
//alert($); // check if the dollar (jquery) function works | |
//alert($().jquery); // check jQuery version | |
$("#header").hide(); | |
$("#side-panel").hide(); | |
$("#view-message").hide(); | |
$("#viewList").hide(); | |
$("td").css("font-size", "20px"); | |
$("th").css("font-size", "20px"); | |
setInterval("reload()", 10000); | |
} | |
function reload() { | |
$("#projectstatus").load("https://ci-app.int.bbc.co.uk/hudson/view/Olympics%202012%20Data%20Screen/ #projectstatus"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment