mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-27 14:48:36 -05:00
26 lines
566 B
JavaScript
26 lines
566 B
JavaScript
function timeago()
|
|
{
|
|
$("time.timeago").timeago();
|
|
$("time.timeago").each(function(){
|
|
var date = new Date($(this).attr("datetime"));
|
|
$(this).attr("title",date.toLocaleString());
|
|
});
|
|
}
|
|
|
|
(function(){
|
|
timeago();
|
|
|
|
var incidents = $('.timeline');
|
|
$("body").on("click", "#loadmore", function(e){
|
|
e.preventDefault();
|
|
var url = $("#loadmore").attr("href") + "&ajax=true";
|
|
$("#loadmore").remove();
|
|
|
|
$.get(url,
|
|
function(data){
|
|
incidents.append(data);
|
|
timeago();
|
|
});
|
|
});
|
|
})();
|
|
|