[Userscript] Export "known words" to clipboard

First userscript, please be gentle (I’m terrible with JS)

Export Known Words

[ Script install guide ] (Tampermonkey, Violentmonkey, etc.)
[ Download+install “Export Known Words” ]

All this does is naively copy your “known words” to your clipboard.

MaruMori is amazing, and they just added a feature to import lists of words to ignore, so here’s a quick and easy way to get that list of words from Kitsun.

Bugs/feedback

If you find an issue with the script, I can’t promise I can fix it or help you debug (life is busy). If somebody wants to take over “maintenance,” I’m more than happy to link this post to your superior userscript!

Good luck <3

Known bugs

  1. It only captures (approximately) the items currently in view in the scrolling window. Fixed in v0.3
2 Likes

This is likely due to the table being a “virtual” list. Meaning it only loads and shows the data that you are currently supposed to see (while scrolling) in order to not overload the browser (in case you have thousands of cards/data for example).

I’m not sure if user-scripts can access the API, otherwise, you could also get the full data from there. You can check which call is being done in the network tab of the dev tools for your browser (and also see how the data is formatted in the result).

2 Likes

I haven’t done much UI dev, so that definitely threw me for a loop when I saw the table rows being recycled!

Thanks, that’ll probably be the easiest - I saw some data in the IndexedDB, but those just look like a card cache (which makes sense, given the “wipe cache” in settings).


It wasn’t easy to do an authenticated API call, so I just hooked XHR to read the data from the request that the webapp is already doing.


The userscript engines changed from a GM_whatever to a GM.whatever standard… GM.xmlHttpRequest uses auth cookies: javascript - ReferenceError: GM_xmlhttpRequest is not defined - Stack Overflow

2 Likes