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 () {
51
51
function getVersion ( ) {
52
52
var pathname = window . location . pathname . replace ( "/en/" , "/" ) ;
53
53
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 ;
55
55
}
56
56
57
57
@@ -95,8 +95,8 @@ $(document).ready(function () {
95
95
var href = window . location . origin + pathname ;
96
96
if ( lang === "en-US" ) {
97
97
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');
100
100
} else if ( window . isLocal ) {
101
101
href = window . location . origin + pathname . replace ( / ( ( [ ^ \/ ] * \/ ) { 3 } ) ( [ ^ \/ ] * ) / , '$1$3/en' )
102
102
} else {
You can’t perform that action at this time.
0 commit comments