File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 2929 }
3030 function closeMenu ( ) {
3131 if ( this === backdrop ) {
32- var rustdoc = document . querySelector ( ".rustdoc" ) ;
33- if ( rustdoc ) {
34- rustdoc . focus ( ) ;
35- } else {
36- document . documentElement . focus ( ) ;
37- }
32+ document . documentElement . focus ( ) ;
3833 } else if ( currentMenu . querySelector ( ".pure-menu-link:focus" ) ) {
3934 currentMenu . firstElementChild . focus ( ) ;
4035 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ <h1 class="brand">{{ "cubes" | fas(fw=true) }} Docs.rs</h1>
1414
1515 < div class ="buttons ">
1616 < button type ="submit " class ="pure-button pure-button-normal "> Search</ button >
17- < button type ="submit " class ="pure-button pure-button-normal " id ="i-am-feeling-lucky-button ">
17+ < button type ="submit " class ="pure-button pure-button-normal " name ="i-am-feeling-lucky " value =" 1 ">
1818 I'm Feeling Lucky
1919 </ button >
2020 </ div >
@@ -81,16 +81,6 @@ <h1 class="brand">{{ "cubes" | fas(fw=true) }} Docs.rs</h1>
8181 return String . fromCharCode ( ev . charCode || ev . keyCode ) ;
8282 }
8383
84- document . getElementById ( "i-am-feeling-lucky-button" ) . onclick = function ( ) {
85- var form = document . getElementsByClassName ( "landing-search-form" ) ;
86- var input = document . createElement ( 'input' ) ;
87- input . type = 'hidden' ;
88- input . name = 'i-am-feeling-lucky' ;
89- input . value = 1 ;
90- document . getElementsByClassName ( "landing-search-form" ) [ 0 ] . appendChild ( input ) ;
91- return true ;
92- } ;
93-
9484 function handleShortcut ( ev ) {
9585 if ( ev . ctrlKey || ev . altKey || ev . metaKey || document . activeElement . tagName === "INPUT" ) {
9686 return ;
You can’t perform that action at this time.
0 commit comments