[Userscript] Item Filter

Ok, I think I will hold off for now, then. It would be a lot of effort for little gain, especially as I already set it to run at document-idle to easily resolve another issue

1 Like

Yes, it’s probably not worth the effort.

I still don’t understand what causes this other issue (I assume you are talking about the jStorage listener error). When this was happening to me, I thought that the problem is that jStorage can’t handle removing a listener callback from within this callback, because once I delayed the jStorage.stopListening() call until after the listener callback had finished, the error was gone. But then I did a bit more testing, and usually jStorage handles this just fine – it seems like just this one practiceQueue change at the start of the extra study session does not allow removing the listener :thinking:

Some code I used for analyzing this jStorage error
// ==UserScript==
// @name         jStorage Error Test
// @namespace    jStorageErrorTest
// @version      0.1
// @description  jStorage error test
// @author       Sinyaven
// @license      MIT-0
// @match        https://www.wanikani.com/extra_study/session?title=Recent+Lessons
// @require      https://greasyfork.org/scripts/441518-wanikani-queue-manipulator/code/WaniKani%20Queue%20Manipulator.js?version=1032684
// @grant        none
// @run-at       document-start
// ==/UserScript==

(async function() {
	"use strict";
	/* global $, wkQueueManipulator */
	/* eslint no-multi-spaces: off */

	function changeHandler() {
		$.jStorage.stopListening("practiceQueue", changeHandler);
		console.log("stopped listening");
	}

	async function changeHandlerAsync() {
		await true; // delay any further execution of this function until later
		$.jStorage.stopListening("practiceQueue", changeHandlerAsync);
		console.log("stopped listening");
	}

	await wkQueueManipulator.jQueryReady();
//	await sleep(1000);
	$.jStorage.listenKeyChange("practiceQueue", changeHandler);       // this version causes an error
//	$.jStorage.listenKeyChange("practiceQueue", changeHandlerAsync);  // this version works fine
//	$.jStorage.set("practiceQueue", $.jStorage.get("practiceQueue"));

	function sleep(ms) {
		return new Promise(resolve => setTimeout(resolve, ms));
	}
})();
2 Likes

Hello, I hope it’s ok to ask this. I read the thread but didn’t see if this was answered before. Is there any way of seeing which items have been filtered?

No, there is not (except if you filter the items, finish the entire review session, and then start the session again without filtering anything – then you get questioned on the previously filtered items).

Is there a use case for which you need to see the filtered items?

Yes, since I have set some of them to be answered correctly automatically (usually because they are leeches, but not always), I’d like to go back a see which items are marked as “burned” without me actually having burned them.

Instead of implementing an item list feature into this script, I remembered a suggestion by @Kumirei [1] and decided to create a companion script that registers your filtered items in an Open Framework filter:

This allows you to view the item list in an already established and feature-rich tool like Item Inspector. With Open Framework Item Filter and Item Inspector installed, you just have to locate the Item Inspector on your dashboard, click the settings gear button, go to the “Tables” tab, add a “New” table list, give it a name, find the “Item Filter” checkbox (probably at the bottom), and activate it. After saving, you should see a list of all your filtered items.


  1. ↩︎
2 Likes

This is great! Thank you so much for creating this!

2 Likes

does not work.

correction, seems to only work when I turn off all other scripts including open framework.
Seems like open framework prevents it from working properly.
Kind of a shame since most other scripts require it. Just reset back 10 levels which was probably pretty stupid on my end. I just wanna learn kanji, I’ve seen all the vocabulary 1000 times so I have hundreds of vocab reviews that I have to get through so I can progress on my kanji. thanks for this. Hope it gets updated so I can use it with everything else on.

correction, still doesn’t work.
I give up.

It still works for me. Are you using Tampermonkey and Google Chrome? It seems that there are currently problems with Tampermonkey sometimes not injecting scripts with that setup. In that case, it might help to switch to Violentmonkey. Other than that, could you look through the suggested steps in this guide to see if any of them give more hints to why it does not work for you?

1 Like

Hey, I’m using this script to filter out radicals completely since I’m going through WK from lvl 1 for the 3rd time now. I like to do my reviews on several computers but noticed that this script only uses localStorage for the list of filtered items.
Is there any chance of a sync feature or companion script coming in the future?

I’ll have to try that. Thanks. All other scripts seemed to work just fine so that’s why I thought it was the script but I am using chrome so it could be a tampermonkey issue.

I was expecting that Tampermonkey would have a storage sync feature and tried to use the Tampermonkey storage instead of localStorage, but sadly Tampermonkey only syncs the list of scripts but not their settings. At the moment I cannot think of a good solution for syncing the settings, but if anyone has suggestions, let me know.

2 Likes

Maybe this is what you are looking for?

2 Likes

I’m sure it would be a lot of work, but just wanted to put in a request that if possible I would love to see this script updated to work with the new WaniKani UI as I still heavily use it to skip over vocab I already know!

1 Like

I will update the script once I’m back from work in ~10 hours.

1 Like

I have updated the script to version 1.9. If anything doesn’t work, let me know.

4 Likes

Does not work from today anymore… :frowning: it says “do u want to autopass?” i say “yes” but nothing happens…

1 Like

Not working for me either. When I exit my reviews, the remaining auto skip items still show as due. So its skipping them, but not sending in the correct answer for some reason

2 Likes

@kanjikancho @sadfghjkl This should now be fixed in version 1.14.

2 Likes