File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ $(document).ready(function () {
5151 function getVersion ( ) {
5252 var pathname = window . location . pathname . replace ( "/en/" , "/" ) ;
5353 var match = pathname . match ( / ^ \/ ( d e v | (?: \d + \. ) + \d ) \/ .* / ) ; //匹配版本:dev|9.0.0
54- return match && match [ 1 ] ? match [ 1 ] : null ;
54+ return match && match [ 1 ] ? match [ 1 ] : null ;
5555 }
5656
5757
@@ -95,8 +95,8 @@ $(document).ready(function () {
9595 var href = window . location . origin + pathname ;
9696 if ( lang === "en-US" ) {
9797 if ( getVersion ( ) ) {
98- // href = window.location.origin + pathname.replace(/([^\/]*\/){1}([^\/]*)/, '$1$2/en');
99- href = window . location . origin + pathname . replace ( / ( [ ^ \/ ] * \/ ) { 2 } ( [ ^ \/ ] * ) / , '/$1$2/en' ) ;
98+ href = window . location . origin + pathname . replace ( / ( [ ^ \/ ] * \/ ) { 1 } ( [ ^ \/ ] * ) / , '$1$2/en' ) ;
99+ // href = window.location.origin + pathname.replace(/([^\/]*\/){2}([^\/]*)/, '/$1$2/en');
100100 } else if ( window . isLocal ) {
101101 href = window . location . origin + pathname . replace ( / ( ( [ ^ \/ ] * \/ ) { 3 } ) ( [ ^ \/ ] * ) / , '$1$3/en' )
102102 } else {
You can’t perform that action at this time.
0 commit comments