[Userscript] Search WaniKani via browser search bar

I created a little script inspired by this feature request: https://community.wanikani.com/t/search-wanikani-via-chrome-search-bar/

It allows you to search WaniKani by using the parameter “q” in the URL, such as: https://www.wanikani.com/dashboard?q=昔話

This in turn will make it possible to define a custom search keyword e.g. in Chrome so that you can e.g. type “wk”, then hit space and enter the term you want to search for:

It is available via greasyfork: https://greasyfork.org/en/scripts/40499-wanikani-url-keyword-search
Only tested it (briefly… ) in Chrome.


Hey, thank you for sharing your work!

Unfortunately, it’s not working for me (Firefox 64). The search string gets pasted into the search box, but after that the page reloads and WaniKani displays the error message “You are already signed in.”

Oh :-/
I have to admit that I only tested it in Chrome where it is still working fine. I will try to look into this but I have two other things on my list of things I promised to look into first and am somewhat busy at the moment so I can’t promise when I’ll get to it.

@irrelephant, not sure if you’re still around and maintaining scripts, but a small fix is needed due to changes WaniKani made a few months ago. Even though the search still executes, it doesn’t actually get displayed until you click the search icon (which makes the input and results visible). I added the following to the end of the submitSearch method to trigger the click event so the results show right away:

var searchButton = document.getElementById('search__trigger');

(Also, you should probably get rid of the console logs while you’re at it.)

1 Like