Wanikani Reorder Ultimate [old version, not working]

thanks mate

An error occurred while I am try to create a new script.

Script
// ==UserScript==
// @name         WaniKani Mini Item Marker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.wanikani.com/review/session
// @grant        none
// ==/UserScript==

var word = '';
var marker_array = $.jStorage.get('marker_array', []);

(function() {
    'use strict';
    $('#additional-content ul').append('<li id="option-marker" class="disabled" style="width: 16.5%"><span title="Mark Item"><i class="icon-flag"></span></li>');
    word = $('div#character').text().trim();
    if(marker_array.indexOf(word) !== -1){
        $('#option-marker').removeClass('disabled');
        $('#option-marker span').attr('title', 'Unmark Item');
    } else {
        $('#option-marker').addClass('disabled');
        $('#option-marker span').attr('title', 'Mark Item');
    }

    $.jStorage.listenKeyChange('currentItem', function(key) {
        word = $('div#character').text().trim();
        if(inMarker(word)){
            $('#option-marker').removeClass('disabled');
            $('#option-marker span').attr('title', 'Unmark Item');
        } else {
            $('#option-marker').addClass('disabled');
            $('#option-marker span').attr('title', 'Mark Item');
        }
    });

    $('#option-marker').click(function(){
        if($(this).find('span').attr('title') === 'Mark Item') {
            $(this).find('span').attr('title', 'Unmark Item');
            marker_array.push(word);
            $.jStorage.set('marker_array', marker_array);
        } else {
            $(this).find('span').attr('title', 'Mark Item');
            marker_array.splice(marker_array.indexOf(word),1);
            $.jStorage.set('marker_array', marker_array);
        }
        $(this).toggleClass('disabled');
    });
})();



I made my own version (based on @embeā€™s version which I liked a lot) with two tiny changes:

  • start the UI in a collapsed mode
  • apply settings automatically immediately when opening the page (because I always want the same settings anyway)
  • Iā€™m not hooking it into the AppStore so that it doesnā€™t get too cluttered

I hope posting modified versions to greasyfork like that is OK. Itā€™s just very convenient this way because I can reuse this script on multiple devices.

3 Likes

Is anyone having problems with this script? Somehow, this one and the override stopped working on my computer =/

1 Like

I have a feeling this script is the reason why my lessons get jammed 1 times out of 3. :frowning:
(I use Violentmonkey & Firefox)

Same! Ever since Firefox updated to their new version.

I ā€˜installedā€™ this with Tampermonkey on my desktop several weeks ago, and while it is listed in Tampermonkey as enabled, it does not show up as one of the userscripts in WK (the other 6 scripts intalled are working fine).

Iā€™d appreciate any advice anyone has to offer.

1 Like

The one linked from the top-post is broken due to some Wanikani changes a few months ago. Thereā€™s a temporary fix version [here] that probably still works.

3 Likes

though sometimes there are a few items for which level appear as undefined, this might be due to changes/updates done by WK like few vocab words were modified recently.

It seems there was an error and it asked for me to put this here

Error details

TypeError: Cannot read property ā€˜radā€™ of undefined
TypeError: Cannot read property ā€˜radā€™ of undefined at Object.updateVisual (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=b8711cf2-a0e1-47ee-9438-0447a34ad0ab:43:12) at Object.apply (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=b8711cf2-a0e1-47ee-9438-0447a34ad0ab:132:13) at Object.create (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=b8711cf2-a0e1-47ee-9438-0447a34ad0ab:185:17) at Object.init (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=b8711cf2-a0e1-47ee-9438-0447a34ad0ab:104:14) at HTMLDivElement.eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=b8711cf2-a0e1-47ee-9438-0447a34ad0ab:637:8) at HTMLDivElement.dispatch (https://cdn.wanikani.com/assets/v03/review/application-a9d56fe7838575d6e64bf494c077af35b542a299fc31c1aebc9f33104b08df8b.js:2:21597) at HTMLDivElement.g.handle (https://cdn.wanikani.com/assets/v03/review/application-a9d56fe7838575d6e64bf494c077af35b542a299fc31c1aebc9f33104b08df8b.js:2:18292) at Object.trigger (https://cdn.wanikani.com/assets/v03/review/application-a9d56fe7838575d6e64bf494c077af35b542a299fc31c1aebc9f33104b08df8b.js:2:20714) at HTMLDivElement. (https://cdn.wanikani.com/assets/v03/review/application-a9d56fe7838575d6e64bf494c077af35b542a299fc31c1aebc9f33104b08df8b.js:2:28182) at Function.each (https://cdn.wanikani.com/assets/v03/review/application-a9d56fe7838575d6e64bf494c077af35b542a299fc31c1aebc9f33104b08df8b.js:1:17256)

Logs:
WKU Init()
Checking for UID updates
Applying UID levels

Refreshing the page seems to have fixed the issue.

I wonder if it would be possible to add a extra function: to force reorder, but with groups of vocab using the same kanji. Let me explain a little better.

When we guru a bunch of kanji, during the new lessons weā€™ll get the vocab in groups, each composed by one kanji that was guruā€™d. By clicking ā€œForce reorderā€, weā€™ll be completely breaking these groups.

I sometimes force reorder because the words I get seem a little hard to learn and I want something easier. I mean, learning a bunch of new words for months nonstop is pretty hardcore, so I think every detail counts to make a healthy study routine. However, if I force refresh, I will remove this same group structure that allows me to memorize the new vocab better.

Having a force refresh that would give us new items while still maintaining these groups would be a cool feature.

2 Likes

havenā€™t used the script in a long time and i understand there have been changes to WK and inevitably this script. below are some of my findings. i only use the script for lessons, not reviews. hope it helps!

  • force reorder only seems to work one time or not at all, otherwise i have to refresh the page.
  • i canā€™t seem to deselect individual types or levels.
  • i like to do 1 radical (if available) and 1 kanji (if available) and the rest older vocab during my lessons to break things up. is it possible to add the functionality to be able to select the number of each type?

thanks!

EDIT: seems the force reorder might be fine, just that because of the sorting level first, there only happened to be that many options. still unable to deselect certain types though

I got this today doing reviews.

An error has occurred within WaniKani Reorder Ultimate. Please post the error below on the forum thread.

ReferenceError: DATA is not defined
tms_0f99a06f_55c6_4b15_89c6_de918647e2f6/
Logs:
WKU Init()
Checking for UID updates
Applying UID levels

Firefox 55, script version 2.0.201, Tampermonkey

Not related to Vorpalā€™s issue, but the only thing I didnā€™t like about the original script was the distracting dark grey background. So I edited line 37 in the code to change the three color numbers to this:

'	background: rgb(238, 238, 238);'+

Now, for my computer at least, the scriptā€™s background blends in with WaniKaniā€™s background color so it is not distracting at all. I like to speed through my reviews and I rely on the black background telling me to enter the Japanese reading rather than the English meaning prompt (which do not have the background color).

1 Like

The script is currently broken due to Wanikani changes, but I made a temporary fix a while back:

One more thing: edit Line 31 to this so you can see the text in that bar when reviewing:

'	color: rgb(0, 0, 0);'+

Iā€™m a newbie, just installed this, not lots of time to troubleshoot yet. But the screen itself asked me to post error report here:

RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:581:21) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51) at Math.newRandom [as randomB] (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fe710bc7-7d31-4ecc-ac67-1074348b70d1:599:51)

Logs:
WKU Init()
Checking for UID updates
Applying UID levels

@elispringer,

i donā€™t get it , how to open the program.
iā€™ve installed the tamperedmonkey and the reorder ultimate script.
Can someone give advice, thanks a lot.

1 Like

When you go to your reviews page, the interface appears below the area where you enter your answers. You may need to scroll down if your screen is small. Also, it may be minimized, so look for a ā€˜+ā€™, I think on the right side of the screen below where you enter your answers. If you still donā€™t see anything, check your Javascript console for errors to report here. To open the Javascript console, press F12 and click on the Console tab. Also, make sure you are using the version of the script in the post above yours, because thereā€™s a known issue with older versions due to changes in Wanikani.