User:Voice of All/Protection/monobook.js: Difference between revisions

Content deleted Content added
m
m alert(li_html);
Line 77:
var curtime = now.toUTCString().replace(/GMT/, "UTC");
var li_html = xmlpage.split('<li>')[1].split('</li>')[0];
alert(li_html);
var lasttime = li_html.split(' (<a href=')[0].split(' (<A href=')[0].split('(<a href=')[0].split('(<A href=')[0];
var totdays = getElapsedTime(curtime,lasttime);
totdays = Math.round((100)*totdays)/100;
var reason = li_html.split('<span class="comment">(')[1].split(')</span>')[0];
reason = reason.split(' [edit=')[0].split(' [move=')[0].split(' [edit=')[0].split(' [move=')[0];
if ( reason=='' ) reason = 'none given';
document.getElementsByTagName('li')[li_prot].innerHTML += '<br>[<strong>' + totdays + ' days old</strong>] <i>(' + reason + ')</i>';