olivierdagenais / tampermonkey-copy-url

A Tampermonkey userscript to copy nice-looking URLs to the clipboard.
MIT License
0 stars 0 forks source link

feat: set focus to Bitbucket codesearch textbox #61

Closed olivierdagenais closed 7 months ago

olivierdagenais commented 7 months ago

I usually operate Bitbucket's search via a smart/parameterized bookmark, allowing me to type something like b parse in my browser's address bar and that gets converted into http://localhost:7990/bitbucket/plugins/servlet/search?q=parse

The problem is the way the page loads, the focus is by default to the left of the logo and the first tab stop is to #content and that appends #content to the URL which triggers another search. You could also keep tabbing 8 or 9 more times, but this PR makes it such that the textbox gets focus as soon as it loads.

This makes it easy to not only refine the query but also to TAB to the results, allowing keyboard-based scrolling.

Tested with Bitbucket DC versions 7.21.10 and 8.9.9.

Fixes #48.