PageSourceSearch

https://www.lacouronne-rouen.co.uk/js/history.js

js lacouronne-rouen.co.uk collected 2026-09-28 12:43:57 UTC 1,839 bytes, 84 lines download raw bytes

1function loadAPI(href){
2  //e.preventDefault();      
3  getContent(href, true);  
4
5
6}
7
8function initAPI(e,href){
9  e.preventDefault();      
10  getContent(href, true);    
11    /*        
12  window.addEventListener("popstate", function(e) {
13    getContent(location.pathname, false);
14  }); 
15	*/
16}
17
18
19function getContent(url, addEntry) {
20
21	var old = "."+$(location).attr('pathname')+$(location).attr('search');
22	
23	
24  $.post(url, {method:"post"})
25  .done(function( data ) {      
26    
27    $('#contentHolder').html(data);    
28				
29    if((addEntry == true) && (old!=url) ) 
30    {  
31      history.pushState(null, null, url); 
32			if($("#title"))
33			{
34				document.title = $("#title").val();
35			}
36			if($("#description"))
37				$('meta[name=description]').attr('content', $("#description").val());
38    }  
39		
40		$("html, body").animate({ scrollTop: 0 }, "slow");
41		  
42  });
43};
44
45
46$(function(){
47  $('.menuAPI').on('click', function(e){
48
49    e.preventDefault();    
50    var href = $(this).children("a").attr('href');    
51    getContent(href, true);    
52    $('.menuAPI').removeClass('active');
53		$('.menu-dropdown').removeClass('active');
54		$('.nav-parent').removeClass('active');
55		$('.nav-top').removeClass('active');
56		
57		
58    $(this).addClass('active');           
59		$(this).closest('.menu-dropdown').addClass('active'); 
60		$(this).closest('.nav-parent').addClass('active');
61		$(this).closest('.nav-top').addClass('active');
62		
63  });
64  
65	
66  window.addEventListener("popstate", function(e) {
67    getContent($(location).attr('pathname')+$(location).attr('search'), false);
68  });
69	
70	
71  
72  $(document).on({
73    ajaxStart: function() { 
74      $("#loading").show();
75      $("#contentHolder").css("opacity","0.5");
76    },
77    ajaxStop: function() { 
78      $("#loading").hide(); 
79      $("#contentHolder").css("opacity","1");
80    }    
81  });
82
83             
84});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.