File tree 1 file changed +19
-0
lines changed
src/librustdoc/html/static
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 2208
2208
} ;
2209
2209
2210
2210
autoCollapse ( getPageId ( ) , getCurrentValue ( "rustdoc-collapse" ) === "true" ) ;
2211
+
2212
+ if ( window . location . hash && window . location . hash . length > 0 ) {
2213
+ var hash = getPageId ( ) ;
2214
+ if ( hash !== null ) {
2215
+ var elem = document . getElementById ( hash ) ;
2216
+ if ( elem && elem . offsetParent === null ) {
2217
+ console . log ( elem , elem . parentNode ) ;
2218
+ if ( elem . parentNode && elem . parentNode . previousSibling ) {
2219
+ var collapses = elem . parentNode
2220
+ . previousSibling
2221
+ . getElementsByClassName ( "collapse-toggle" ) ;
2222
+ if ( collapses . length > 0 ) {
2223
+ // The element is not visible, we need to make it appear!
2224
+ collapseDocs ( collapses [ 0 ] , "show" ) ;
2225
+ }
2226
+ }
2227
+ }
2228
+ }
2229
+ }
2211
2230
} ( ) ) ;
2212
2231
2213
2232
// Sets the focus on the search bar at the top of the page
You can’t perform that action at this time.
0 commit comments