mirror of
				https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
				synced 2025-11-03 20:20:20 -05:00 
			
		
		
		
	In 184247c4abe777399a98f2711f47b2d6e1d5d57c (#99) jquery.timeago was updated from version 1.6.1 to 1.6.7. This changed the default value for allowFuture, which is responsible for restricting whether a date in the future would be shown e.g. as "3 days ago" or "3 days from now".
		
			
				
	
	
		
			33 lines
		
	
	
		
			697 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			697 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
function timeago()
 | 
						|
{
 | 
						|
	$("time.timeago").timeago();
 | 
						|
	$("time.timeago").each(function(){
 | 
						|
		var date = new Date($(this).attr("datetime"));
 | 
						|
		$(this).attr("title",date.toLocaleString());
 | 
						|
	});
 | 
						|
}
 | 
						|
 | 
						|
(function(){
 | 
						|
	jQuery.timeago.settings.allowFuture = true;
 | 
						|
 | 
						|
	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();
 | 
						|
			});
 | 
						|
		});
 | 
						|
	})();
 | 
						|
	
 |