Created
July 17, 2024 20:57
-
-
Save ericboehs/a37d2f1cc304e648c454d408dd57393b to your computer and use it in GitHub Desktop.
Focus VA Platform Docs Search results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I combine this with a Raycast Quicklink that searches our public docs:
Screenshot.2024-07-17.at.15.53.36.mp4