File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11/******************************************* 
22 * IDENTIFY OLD VERSIONS 
33 *******************************************/ 
4+   function  UrlExists ( url )  { 
5+       var  http  =  new  XMLHttpRequest ( ) ; 
6+       http . open ( 'HEAD' ,  url ,  false ) ;  // TODO: change this to 'true' and use a promise to render the out of date banner 
7+       http . send ( ) ; 
8+       return  ( http . status  !==  404 ) 
9+   } 
410
511 function  isNewest ( )  { 
612  try { 
1319      : release . replace ( / \/ f a l l \d { 4 } / ,  "/spring"  +  ( url_year + 1 ) ) ; 
1420
1521    // If that version exists, throw up a warning 
16-     if ( UrlExists ( release ) ) { 
22+     if ( UrlExists ( next_release ) ) { 
1723      var  outOfDate  =  document . createElement ( 'div' ) ; 
1824      outOfDate . setAttribute ( 'id' ,  'outOfDate' ) ; 
1925      outOfDate . innerHTML  =  'These materials are OUT OF DATE! To get the latest version' 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments