The New And Improved List Of API and Third Party Apps

Nah, just let it be outdated.

I am thinking of writing a script / web app, for sorter; so that anyone can use.

Discourse (WaniKani Community) has an API to output JSON - https://docs.discourse.org No webscraping - The New And Improved List Of API and Third Party Apps I am not sure about authorization part, though.

Thanks for helping maintain the list!

I already did this for most scripts when I cleaned up the list a couple of months ago :eyes: Though I kept WKOF as Wanikani Open Framework because I felt like “Wanikani” was very much part of its identity

sweat_smile

I agree. Alphabetic at least makes it easier to find, and in my opinion easier to peruse as well

1 Like

If so, WaniKani/WK should be removed, in order to easily sort alphabetically.

If something is not sorted, like WKOF, why bother removing WaniKani/WK?

Broken scripts should be replaced, or removed if no actual script can be found. If buggy scripts (have unfixed bug reports) are somehow kept, there should be some notice.

Found it. It exists after all and my memories did not betray me. It’s KunOn+ and is in the “outdated Scripts” section, which is why it didn’t catch my eye initially.

2 Likes

Curious on whether you’ve got it to work or any bug reports?

Anyway, I’ve come to agree that scripts should be sorted alphabetically, and WK/WaniKani removed, unless WK/WaniKani is a part of its identity (and WKOF isn’t not the only such name).

Nonetheless, for Outdated sections, anything with unfixed bug reports should be moved down; and having users, despite some tolerable bugs, should be moved up.

1 Like

Yep, it works. I was not happy with how the script forgot to concatinate the strings to say 部首の名前 and just says 名前. I edited the script to add the の and to concatinate the string so it says the full thing:

Script editied to say the whole thing
// ==UserScript==
// @name        WK Custom Review Question (KunOn+)
// @namespace   WK_CustomQuestion
// @description Changes the text of the Review or Lesson Quiz question. Specifies ON or KUN reading for Kanji. Options to have the text in English or Japanese.
// @author      hoovard
// @include     https://www.wanikani.com/review/session*
// @include     http://www.wanikani.com/review/session*
// @include     https://www.wanikani.com/lesson/session*
// @include     http://www.wanikani.com/lesson/session*
// @version     0.4.3
// @license     Do what you want with it (Preferably improve it).
// @grant       none
// ==/UserScript==
// Version 0.4.3 applies to Reviews and Lesson Quizzes.

// Language options
// English "en", Japanese "ja"
var strLang = "ja";


// Tested on the following:
// Firefox 35.0.1 and Chrome 39.0.2171.95 (64-bit), Linux Mint 17.1 Cinnamon 64-bit
// Firefox 35.0.1 and Chrome 40.0.2214.115 m, Windows 8.1 64-bit

// Thanks to Rui Pinheiro (LordGravewish) for the original script 
// and to Ethan for the idea to use MutationObserver to detect changes in the DOM.

// Vars to compose the replacement question string
var strKanji;
var strRadical;
var strVocab;
var strMeaning;
var strReading;
var strVocabReading;
var strOn;
var strKun;
var strName;

// Translations
switch (strLang)
{
	case "en":
		strKanji = "Kanji";
		strRadical = "Radical";
		strVocab = "Vocabulary";
		strMeaning = "Meaning";
		strReading = "yomi";
		strVocabReading = "Reading";
		strOn = "on'";
		strKun = "kun'";
		strName = "Name";
		break;
	case "ja":
		strKanji = "漢字の";
		strRadical = "部首の";
		strVocab = "単語の";
		strMeaning = "意味";
		strReading = "読み";
		strVocabReading = "読み";
		strOn = "音";
		strKun = "訓";
		strName = "名前";
		break;
}

// Variable to save and check against the previous contents of the jStorage item
var objSavedCurrentItem;

// Review or Lesson Quiz. jStorage objects are different.
bIsReview = ($(location).attr('href').indexOf("review") != -1);

// Code from Stack Overflow to detect changes in the DOM. 
// (http://stackoverflow.com/questions/3219758/detect-changes-in-the-dom/14570614#14570614)
var observeDOM = (function(){
    var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
        eventListenerSupported = window.addEventListener;

    return function(obj, callback){
        if( MutationObserver ){
            // define a new observer
            var obs = new MutationObserver(function(mutations, observer){
                if( mutations[0].addedNodes.length || mutations[0].removedNodes.length )
                    callback();
            });
            // have the observer observe for changes in children
            obs.observe( obj, { childList:true, subtree:true });
        }
        else if( eventListenerSupported ){
            obj.addEventListener('DOMNodeInserted', callback, false);
            obj.addEventListener('DOMNodeRemoved', callback, false);
        }
    }
})();

// Callback function observing the 'question-type' div 'h1' element
var observeMe = $('#question-type h1')[0];
observeDOM( observeMe ,function(){ 
    var objCurItem;
    if (bIsReview) {
		objCurItem = $.jStorage.get("currentItem");
	} else {
		objCurItem = $.jStorage.get("l/currentQuizItem");
	}
	
    
    // Make sure that the currentItem has changed before updating. 
    // Otherwise you will respond to your own DOM changes.
    if (objCurItem != objSavedCurrentItem) {
		objSavedCurrentItem = objCurItem;
		
		var strQuestionType;
		if (bIsReview) {
			strQuestionType = $.jStorage.get("questionType");
		} else {
			strQuestionType = $.jStorage.get("l/questionType");
		}
		
		var strItemType = "";
		var strReadingType = "Reading";
		
		// Compose the string elements to be sent into the h1 element
		if ("kan" in objCurItem)
		{
			// Kanji
			strItemType = strKanji;
			if (strQuestionType == "reading") {
				if(objCurItem.emph == "onyomi")
					strReadingType = strKanji + strOn + strReading;
				else
					strReadingType = strKanji + strKun + strReading;
			} else {
				strReadingType = strKanji + strMeaning;
			}
		}
		else if ("voc" in objCurItem)
		{
			// Vocabulary
			strItemType = strVocab;
			if (strQuestionType == "reading") {			
					strReadingType = strVocab + strVocabReading;
			} else {
				strReadingType = strVocab + strMeaning;
			}
		}
		else if ("rad" in objCurItem)
		{
			// Radical
			strItemType = strRadical;
			strReadingType = strRadical + strName;
		}
		
		// replace the contents of #question-type h1
		switch (strLang)
		{
			case "en":
				$('#question-type h1').html(strItemType + ' <strong>' + strReadingType + '</strong>');
				break;
			case "ja":
				$('#question-type h1').html(strReadingType);
				break;					
		}
	}
	
});

So in itself, the script always ran perfectly fine, it just wasn’t fully finished I think. This script version as posted by a commenter however doesn’t work at all. The script as provided on https://greasyfork.org , perfectly fine.

1 Like

Created a GitHub write-up for the fixed script and released it on Greasyfork for convenience.

1 Like

Hi guys! I haven’t used Wanikani in a reeeeaally long time, and I’m picking it up again. I’ve noticed that some scripts that I used to have are now outdated.

I’m specifically looking for the one where you’re allowed to make mistakes/typos and still get through. Is there a similar script? I tried looking through the list, but I didn’t see one. Maybe I missed it…

HELP PLEASE!

1 Like

You want Double Check

2 Likes

Thank you Kumi! Reliable as always~

1 Like

Hi,

I think you can add the Python CLI client I made.

It works for both reviews and lessons. I have been using it a lot.

I use it mostly that way.

wanikani-cli reviews --hard --mnemonics --autoplay
1 Like

You can add it yourself where you see fit, anyone can edit the first post

1 Like

Thanks. I added a CLI section under computer apps. Since technically it should run with any computers that can run python 3.9.

2 Likes