File tree 4 files changed +7
-30
lines changed
4 files changed +7
-30
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,10 @@ document.querySelectorAll('.doc-switcher li.current').forEach(function (el) {
4
4
this . parentElement . classList . toggle ( 'open' ) ;
5
5
} ) ;
6
6
} ) ;
7
+
8
+ // Propagate the current fragment identifier when switching docs versions
9
+ document . querySelectorAll ( '#doc-versions a' ) . forEach ( function ( el ) {
10
+ el . addEventListener ( 'click' , function ( ) {
11
+ this . href = this . href . split ( '#' ) [ 0 ] + window . location . hash ;
12
+ } ) ;
13
+ } ) ;
Original file line number Diff line number Diff line change @@ -19,10 +19,6 @@ define(function () {
19
19
mods . push ( 'mod/list-collapsing' ) ;
20
20
}
21
21
22
- if ( hasClass ( 'version-switcher' ) ) {
23
- mods . push ( 'mod/version-switcher' ) ;
24
- }
25
-
26
22
if ( hasClass ( 'doc-floating-warning' ) ) {
27
23
mods . push ( 'mod/floating-warning' ) ;
28
24
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 154
154
"mod/list-collapsing" : extless ( "{% static 'js/mod/list-collapsing.js' %}" ) ,
155
155
"mod/list-feature" : extless ( "{% static 'js/mod/list-feature.js' %}" ) ,
156
156
"mod/mobile-menu" : extless ( "{% static 'js/mod/mobile-menu.js' %}" ) ,
157
- "mod/version-switcher" : extless ( "{% static 'js/mod/version-switcher.js' %}" ) ,
158
157
"mod/search-key" : extless ( "{% static 'js/mod/search-key.js' %}" ) ,
159
158
"mod/stripe-change-card" : extless ( "{% static 'js/mod/stripe-change-card.js' %}" ) ,
160
159
"mod/switch-dark-mode" : extless ( "{% static 'js/mod/switch-dark-mode.js' %}" ) ,
You can’t perform that action at this time.
0 commit comments