File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ <h1>Clippy Lints</h1> {# #}
55
55
Sorry, this site only works with JavaScript! :( {# #}
56
56
</ div > {# #}
57
57
</ noscript > {# #}
58
+ < script src ="script.js "> </ script > {# #}
58
59
59
60
< div > {# #}
60
61
< div class ="panel panel-default "> {# #}
@@ -144,7 +145,6 @@ <h1>Clippy Lints</h1> {# #}
144
145
</ div > {# #}
145
146
< script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js "> </ script > {# #}
146
147
< script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/languages/rust.min.js "> </ script > {# #}
147
- < script src ="script.js "> </ script >
148
148
{% for lint in lints %}
149
149
< article class ="panel panel-default collapsed " id ="{{lint.id}} "> {# #}
150
150
< header class ="panel-heading " onclick ="expandLint('{{lint.id}}') "> {# #}
@@ -197,6 +197,11 @@ <h2 class="panel-title"> {# #}
197
197
</ article >
198
198
{% endfor %}
199
199
</ div > {# #}
200
+ < script >
201
+ generateSettings ( ) ; { # #}
202
+ generateSearch ( ) ; { # #}
203
+ parseURLFilters ( ) ; { # #}
204
+ </ script > {# #}
200
205
</ div > {# #}
201
206
202
207
< a {#+ #}
Original file line number Diff line number Diff line change 1
1
window . searchState = {
2
2
timeout : null ,
3
- inputElem : document . getElementById ( "search-input" ) ,
3
+ inputElem : null ,
4
4
lastSearch : '' ,
5
5
clearInput : ( ) => {
6
6
searchState . inputElem . value = "" ;
@@ -513,6 +513,7 @@ function generateSettings() {
513
513
}
514
514
515
515
function generateSearch ( ) {
516
+ searchState . inputElem = document . getElementById ( "search-input" ) ;
516
517
searchState . inputElem . addEventListener ( "change" , handleInputChanged ) ;
517
518
searchState . inputElem . addEventListener ( "input" , handleInputChanged ) ;
518
519
searchState . inputElem . addEventListener ( "keydown" , handleInputChanged ) ;
@@ -571,9 +572,6 @@ document.getElementById("disable-shortcuts").checked = disableShortcuts;
571
572
document . addEventListener ( "keypress" , handleShortcut ) ;
572
573
document . addEventListener ( "keydown" , handleShortcut ) ;
573
574
574
- generateSettings ( ) ;
575
- generateSearch ( ) ;
576
- parseURLFilters ( ) ;
577
575
window . addEventListener ( 'DOMContentLoaded' , ( ) => {
578
576
scrollToLintByURL ( ) ;
579
577
filters . filterLints ( ) ;
You can’t perform that action at this time.
0 commit comments