User:Joenuts/Watchlist.js

/* */ jQuery( document ).ready( function( $ ) {

// store Now in object var obNow = new Date; // store Now in YYYY-M-DD format var szCurrentDate = obNow.getFullYear + "-" + (obNow.getMonth+1) + "-" + obNow.getUTCDate;

// scan all h4 elements inside mw-content-text div $("#mw-content-text").find("h4").each( function {

// store h4 date in object var h4Date = new Date( $(this).html ); // store h4 date in YYYY-M-DD format var mydateString = h4Date.getFullYear + "-" + (h4Date.getMonth+1) + "-" + h4Date.getUTCDate;

// only parse through div following h4 element if h4 date matches current date if( mydateString == szCurrentDate ) {

// retrieve the div following h4 element var div = $(this).next;

// scan all elements inside the div following h4 tag identified as current date $(div).find("td.mw-enhanced-rc").each( function {

// store table row date and timestamp in object var myRowTimeStamp = new Date( szCurrentDate + " " + $(this).html.trim + ":00");

// time difference to be manipulated 1000 milliseconds * 60 seconds * 60 minutes * 6 hours if( ( obNow.getTime - myRowTimeStamp.getTime ) < ( 1000 * 60 * 60 * 6) ) { $(this).css("font-weight", "bold" ); }     } );    }  } ); } ); /* */