Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions _static/js/algolia.js

This file was deleted.

11 changes: 11 additions & 0 deletions _static/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ $(document).ready(() => {
Documentation.hideSearchWords();
}

window.addEventListener('keydown', function(event) {
if (event.key === '/') {
var searchField = document.querySelector('#rtd-search-form input[type=text]');
if (document.activeElement !== searchField) {
searchField.focus();
searchField.select();
event.preventDefault();
}
}
});

// Initialize handlers for page scrolling and our custom sidebar.
const mediaQuery = window.matchMedia('only screen and (min-width: 769px)');

Expand Down
4 changes: 1 addition & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@
html_css_files.append("css/dev.css")

html_js_files = [
"js/custom.js?6", # Increment the number at the end when the file changes to bust the cache.
('https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js', {'defer': 'defer'}),
('js/algolia.js', {'defer': 'defer'})
"js/custom.js?7", # Increment the number at the end when the file changes to bust the cache.
]

# Output file base name for HTML help builder
Expand Down