File tree Expand file tree Collapse file tree 3 files changed +12
-30
lines changed Expand file tree Collapse file tree 3 files changed +12
-30
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -246,6 +246,17 @@ $(document).ready(() => {
246246 Documentation . hideSearchWords ( ) ;
247247 }
248248
249+ window . addEventListener ( 'keydown' , function ( event ) {
250+ if ( event . key === '/' ) {
251+ var searchField = document . querySelector ( '#rtd-search-form input[type=text]' ) ;
252+ if ( document . activeElement !== searchField ) {
253+ searchField . focus ( ) ;
254+ searchField . select ( ) ;
255+ event . preventDefault ( ) ;
256+ }
257+ }
258+ } ) ;
259+
249260 // Initialize handlers for page scrolling and our custom sidebar.
250261 const mediaQuery = window . matchMedia ( 'only screen and (min-width: 769px)' ) ;
251262
Original file line number Diff line number Diff line change 217217 html_css_files .append ("css/dev.css" )
218218
219219html_js_files = [
220- "js/custom.js?6" , # Increment the number at the end when the file changes to bust the cache.
221- ('https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js' , {'defer' : 'defer' }),
222- ('js/algolia.js' , {'defer' : 'defer' })
220+ "js/custom.js?7" , # Increment the number at the end when the file changes to bust the cache.
223221]
224222
225223# Output file base name for HTML help builder
You can’t perform that action at this time.
0 commit comments