Finding H1 by XPath
If the document tree is stable (the order of elements is always the same) you can get the XPath and get the H1 element by xPath. That would be the fastest (in the mean of CPU time) solution.
Finding H1 with time in it
Otherwise, I'd use regular expression to detect time format in H1 element.
var headers = document.getElementsByTagName("h1");
//Regexp: Any amount of whitespace; One or two numbers; :; Two numbers; any ammount of whitespace
var check = /\s*[0-9]{1,2}:[0-9]{2}\s*/;
//Position
var pos = 0;
for(var i=0, l=headers.length;i<l;i++)
{
if(check.test(headers[i].textContent))
{
pos = headers[i].offsetTop;
//After finding the element, do not loop any more.
break;
}
}
//Scroll to pixel position [0; pos]
window.scrollTo(0,pos);
Getting specific time and finding it
If you want to jump to as specific time (eg. current time at any moment), go for the Date
object. With that, you can do as follows:
var date = new Date();
var time_string = zeroFill(date.getHours())+":"+zeroFill(date.getMinutes());
//Procceed with the loop
Using the zeroFill function.