mirror of
				https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
				synced 2025-11-03 20:20:20 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			688 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			688 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();
 | 
						|
  
 | 
						|
  $("body").on("click", ".navbar-toggle", function(){
 | 
						|
    $($(this).data("target")).toggleClass("collapse");
 | 
						|
  });
 | 
						|
 | 
						|
	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();
 | 
						|
     	});
 | 
						|
    });
 | 
						|
})();
 | 
						|
    
 |