# Help With Writing a Userscript

**URL:** <https://community.wanikani.com/t/help-with-writing-a-userscript/31003>\
**Category:** API And Third-Party Apps\
**Created:** [May 18, 2018, 4:47pm UTC](https://community.wanikani.com/t/help-with-writing-a-userscript/31003 "2018-05-18T16:47:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newyorkaru](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/newyorkaru/32/235289_2.png) [@newyorkaru](https://community.wanikani.com/u/newyorkaru)\
**Post date:** [May 18, 2018, 4:47pm UTC](https://community.wanikani.com/t/help-with-writing-a-userscript/31003/1 "2018-05-18T16:47:10Z")

</div>

I have several Wanikani tools/games that I’ve written with Javascript but I just can’t seem to figure out how to make them into userscripts. Right now they are just .html and .js files that I have to manually load 😞 They include a search-by-on’yomi tool, a radical search, a verb or adjective lister, and a game where you match the onyomi to the kanji for each level.

I think that they might be helpful for the WK community, but first I need some help from you guys. Anyone willing to help me out?

---

<div class="post-metadata">

**Author:** ![Kumirei](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/kumirei/32/480522_2.png) [@Kumirei](https://community.wanikani.com/u/Kumirei)\
**Post date:** [May 18, 2018, 4:54pm UTC](https://community.wanikani.com/t/help-with-writing-a-userscript/31003/2 "2018-05-18T16:54:05Z")

</div>

**For personal use:**  
Install the Tampermonkey extension and make a new script, copy and paste the code.

**For publication:**  
Go to Greasemonkey, make an account, make a new script, copy and paste the code, publish, share on the forums.

---

<div class="post-metadata">

**Author:** ![newyorkaru](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/newyorkaru/32/235289_2.png) [@newyorkaru](https://community.wanikani.com/u/newyorkaru)\
**Post date:** [May 18, 2018, 5:16pm UTC](https://community.wanikani.com/t/help-with-writing-a-userscript/31003/3 "2018-05-18T17:16:08Z")

</div>

Thanks, I do have those installed but I meant more of the technical details of writing the code. Right now I’m getting tripped up with making my userscript access the API data to make an array.

---

<div class="post-metadata">

**Author:** ![Kumirei](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/kumirei/32/480522_2.png) [@Kumirei](https://community.wanikani.com/u/Kumirei)\
**Post date:** [May 18, 2018, 5:44pm UTC](https://community.wanikani.com/t/help-with-writing-a-userscript/31003/4 "2018-05-18T17:44:30Z")

</div>

I’m not too familiar with the API myself, but you can have a look that the v2 documentation here

> [@API V2 Beta Documentation](https://community.wanikani.com/t/api-v2-alpha-documentation/18987):
>
> Purpose Update the API to meet the needs of both the company and our users. Optimize the API to return only what is necessary. Set the API up for easier versioning, allowing for more frequent updates while maintaining older versions for reliability. Disclaimer Expect breaking changes until the framework has been solidified. Keep in mind this is an beta! There may be more endpoints to come and the structure of API results can be changed dramatically before we release the 2.0 version. Docume…

And the Wanikani Open Framework by rfindley, made to make using the API simpler, here

> **[GitHub - rfindley/wanikani-open-framework: Open framework for writing userscripts for...](https://github.com/rfindley/wanikani-open-framework)**
>
> Open framework for writing userscripts for Wanikani
