Skip to content

Instantly share code, notes, and snippets.

@negipo
Forked from makimoto/jenkins_status_favicon.user.js
Created December 16, 2011 02:18
Show Gist options
  • Save negipo/1484119 to your computer and use it in GitHub Desktop.
Save negipo/1484119 to your computer and use it in GitHub Desktop.
jQuery(function($){
if(!/job/.test(location.href)){
return;
}
var favicon = $('<link />').attr({
rel: 'shortcut icon',
type: 'image/gif'
}).appendTo('head');
var _src = null;
setInterval(function(){
var src = $('#buildHistory .build-row img:first').attr('src');
if(_src != src || /anime/.test(src)){
favicon.attr('href', src);
_src = src;
}
}, 1000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment