The “homophone explorer” script performs some data queries internally, rather than relying on an abstraction library such as the open-Framework.
In this particular case, the URL of the API token has changed recently (around March’19). So the URL needs to be updated in the body of the “homophone explorer” script.
Was broken for me too - looks like the stylesheet may have changed.
To use the purple vocab background you can edit the source, jump down to about line 639 (I’ve got version 0.9.1) and change the t.liWrapper line to the below.
// time to create list item for each item
t.liWrapper = $('<li>',{'class':'vocabulary-' + homophones[readingsIndex].vocabs[i].character + ' character-item'});
Bringing this thread back from the dead, but I just tried this fix and it worked! Thank you, and thank you @Thaos also for the script!
Looks like the script hasn’t been updated so I had to select “Create a new script” from the TamperMonkey dropdown menu, copy/paste the source, and then swap out line 26 with that fix.
I followed all your instructions, reinstalled the script, am running on Chrome, turned off all other scripts, and the script on a vocab page still says my API key is not found. Any suggestions? I would love love this functionality… thanks for any help.
Hello,
in the review window, can you please make the font-size the same as the rest of Wanikani’s original content?
To do so, I have the set the font-size to 16px, and let the line-height be automatically computed:
This is a notice to all new users of the script. It took me a while to understand what I had to do in order to get it working, I hope this helps anybody in a similar situation.
Download the script:
On your userscript manager select the script and click “Edit”.
Go to line 26 and replace the line: 'https://www.wanikani.com/settings/account'
with: 'https://www.wanikani.com/settings/personal_access_tokens'
Go to lines 639 - 640 and replace the lines:
// time to create list item for each item
t.liWrapper = $('<li>',{'class':'character-item', id:'vocabulary-' + homophones[readingsIndex].vocabs[i].character});
with:
// time to create list item for each item
t.liWrapper = $('<li>',{'class':'vocabulary-' + homophones[readingsIndex].vocabs[i].character + ' character-item'});
This answer to this might be hiding somewhere in this thread, but I have yet to spot it - where the homophones should be showing up it says it can’t find my api key - is there more code editing i can do to fix it? I’ve done the code changes on 639-640 and on 26 but the edit to line 26 did not solve the issue. Help
This script wasn’t maintained for a long time and was still built on API Token V1, so I’m quite sure (unless I’m really overlooking something here), that it’s out of order, now that 01/09 (09/01 for Americans) has passed. To get it to work again, someone would have to write the script anew, so that it works with the API Token V2.
the way to read the API v2 key from the settings page cannot work anymore. The API v1 key used to be marked with a specific Html id, so it was straightforward to query its value.
I dont know the details of the v2 API.
with the v1 API, the script would access specially crafted URL addresses, such as: https://www.wanikani.com/api/{VERSION_NUMBER}/user/{USER_API_KEY}/vocabulary/{levels}
i dont know if it feasible with the v2 API, it seems you cannot just update the URL format, and the new key value.
@rfindley, could you please give some hints? Thanks & Regards