File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ $(function() {
88            destUrl  =  document . location . protocol  +  '//'  +  document . location . host  +  destUrl ; 
99        } 
1010        destUrl  =  new  URL ( destUrl ) ; 
11-         let  destPath  =  destUrl . pathname . split ( '/' ) , 
12-             srcPath  =  document . location . pathname . split ( '/' ) ; 
13-         if  ( destPath [ version_path_index ]  !==  srcPath [ version_path_index ] )  { 
14-             destPath [ version_path_index ]  =  srcPath [ version_path_index ] ; 
11+         if  ( destUrl . host  ===  document . location . host )  { 
12+             let  destPath  =  destUrl . pathname . split ( '/' ) , 
13+                 srcPath  =  document . location . pathname . split ( '/' ) ; 
14+             if  ( destPath [ version_path_index ]  !==  srcPath [ version_path_index ] )  { 
15+                 destPath [ version_path_index ]  =  srcPath [ version_path_index ] ; 
16+             } 
17+             destUrl . pathname  =  destPath . join ( '/' ) ; 
18+             $ ( this ) . attr ( 'href' ,  destUrl . pathname ) ; 
1519        } 
16-         destUrl . pathname  =  destPath . join ( '/' ) ; 
17-         $ ( this ) . attr ( 'href' ,  destUrl . href ) ; 
1820    } ) ; 
1921} ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments