A few weeks ago the UCB site was redone and there were a few things that I missed from the old version. One was seeing little pictures of the performers on the show pages. Another was having the most current week be at the top of the schedule.
So, I changed those things with a Safari Extension. Now the little pictures are back and the schedule page doesn’t show past weeks.
If you use Safari, just download the extension and get going: http://dco1.com/design/ucbmodify/ucbmodify.safariextz
The following is just geek information and can/should be ignored. This javascript is in jQuery, which the new UCB site doesn’t use, so it’s included in the extension. The first two lines remove the previous weeks from the schedule. The next big chunk finds the cast list, grabs the performers page and inserts the thumbnails. There’s some CSS that restyles the performer thumbnails on the show pages.$("td.today").parents("tr").prevAll("tr:not(.weeklabels)").remove();
$(".weeklabels th.today").parents("tr").prevAll("tr").remove();
$("#cast").each(function(){
var $currentcastbox = $(this);
$.ajax({
url: '/performers',
dataFilter: function(data) {
var newdata = $("<div />").html(data).find("#talent");
return newdata;},
success: function(data) {
$('body').append($("<div id='performerspage' />").hide());
$("#performerspage").html(data);
$currentcastbox.find("a").each(function(){
$(this).addClass('performerthumb');
var $currentcastmember = $(this);
var currentcasttext = $currentcastmember.text();
var currentcastthumb = $("#performerspage a:contains("+currentcasttext+")").css("background-image").replace("url(","").replace(")","");
$currentcastmember.prepend('<img src="'+ currentcastthumb+'"/>');
});
} // end success function
}); //end AJAX call
$("#performerspage").remove();
}); // end #cast call
-
timneenan liked this
-
jennienewman reblogged this from nahdeeeyah and added:
YOU GUYS! THIS ONLY TOOK 3 SECONDS TO DOWNLOAD AND WORKS! DANNY COHEN IS A HERO!
-
nahdeeeyah reblogged this from dco1
-
markdavidchristenson liked this
-
dco1 posted this