Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Created July 17, 2024 20:57
Show Gist options
  • Save ericboehs/a37d2f1cc304e648c454d408dd57393b to your computer and use it in GitHub Desktop.
Save ericboehs/a37d2f1cc304e648c454d408dd57393b to your computer and use it in GitHub Desktop.
Focus VA Platform Docs Search results
// ==UserScript==
// @name Tab Focus through VA Platform Documentation Search Results
// @description Use the tab key to navigate through VA Platform Documentation Search Results
// @version 1.0.0
// @match *://depo-platform-documentation.scrollhelp.site/search.html*
// @include *://depo-platform-documentation.scrollhelp.site/search.html*
// @grant none
// @author ericboehs [email protected]
// @namespace ericboehs
// ==/UserScript==
(function () {
'use strict';
function init() {
document.querySelectorAll('.vp-search-result a')[0].focus();
}
if (document.querySelector('.vp-search-result a')) {
init();
} else {
setTimeout(init, 500);
if (!document.activeElement.classList.contains('vp-search-result__title')) {
setTimeout(init, 500);
}
}
})();
@ericboehs
Copy link
Author

ericboehs commented Jul 17, 2024

I combine this with a Raycast Quicklink that searches our public docs:

https://depo-platform-documentation.scrollhelp.site/search.html?q={Query}
Screenshot.2024-07-17.at.15.53.36.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment