User:Gary/comments in local time.js: Difference between revisions

Content deleted Content added
code shrinkage
move hook out
Line 9:
*/
 
addOnloadHook(function(commentsInLocalTime);
 
function commentsInLocalTime()
{
// wgCanonicalNamespace = unsafeWindow.wgCanonicalNamespace
Line 105 ⟶ 107:
replace_text(document.getElementById((wgAction == 'edit' || wgAction == 'submit') ? 'wikiPreview' : 'bodyContent'), /(\d\d):(\d\d), (\d{1,2}) ([A-Z][a-z]+) (\d{4}) \(UTC\)/g, adjust_time);
}
 
function add_leading_zero(number)
Line 317 ⟶ 320:
}
}
 
});