File tree 2 files changed +2
-17
lines changed
2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 29
29
}
30
30
function closeMenu ( ) {
31
31
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 ( ) ;
38
33
} else if ( currentMenu . querySelector ( ".pure-menu-link:focus" ) ) {
39
34
currentMenu . firstElementChild . focus ( ) ;
40
35
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ <h1 class="brand">{{ "cubes" | fas(fw=true) }} Docs.rs</h1>
14
14
15
15
< div class ="buttons ">
16
16
< 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 ">
18
18
I'm Feeling Lucky
19
19
</ button >
20
20
</ div >
@@ -81,16 +81,6 @@ <h1 class="brand">{{ "cubes" | fas(fw=true) }} Docs.rs</h1>
81
81
return String . fromCharCode ( ev . charCode || ev . keyCode ) ;
82
82
}
83
83
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
-
94
84
function handleShortcut ( ev ) {
95
85
if ( ev . ctrlKey || ev . altKey || ev . metaKey || document . activeElement . tagName === "INPUT" ) {
96
86
return ;
You can’t perform that action at this time.
0 commit comments