Filter to limit number of reviews?

@Kumirei sorry to bother you with this again, but the Review Queue Sizer still isn’t completely happy if I have less reviews pending than the max number of reviews that I have in the script settings. If I have 15 reviews as my max and 14 pending, it will first load OK and give me a few reviews, maybe 10 or something. When I then start my reviews again to do the last 4, it hangs on the “考えている” screen. I get around it by disabling the script if I have few reviews pending, but I would like to keep it running always. Do you have any ideas?

Thanks again for everything you do!

1 Like

I can’t replicate this. Could you check the console for errors when it happens? (F12 → Console)

I tested now. I had 17 reviews remaining and my max is 15. First it gave me 10 with no problem. Then I had 7 left. When I click Review to start those last 7, it gets stuck on the “考えている” screen. I’m sorry I didn’t explain it properly in my first post! Here is my console.

If I disable the Review Queue Sizer and refresh the review, it works fine.

Thanks again for this script, Kumirei, it really is a big help for me!

1 Like

Can you try it again and click on this link in the first error, then scroll up to check which script it is? I know where the other two errors are coming from, but this one is eluding me


Will do! I have to wait a few hours though, until I get a few more reviews due.

In case it helps, these are the scripts I use:


1 Like

Ok, I think I might have figured it out. The link in the first error most likely points towards my script. When the queue is resized I take into account how many items you have already done, in case you change the number on the fly I guess. So, my guess is that when you finish the first session the number of items you have done carries over to the next, causing the queue to become empty if you did more items than are left. Am looking into it

1 Like

Trying to recreate this. So you didn’t finish the session? Or did you wrap up? How did you navigate away from the session and back?

Thanks for looking into this!

I had 17 pending reviews and my max (from the script) was 15.

I started a review session (front page-hit the review button-start session). I got 10 reviews. I finished my reviews all the way through. When I was finished I went back to the front page, which told me that I had 7 pending. I started a review session the same way (front page-hit the review button-start session) and then it got stuck.

Yes, that makes sense. Right now I have 11 pending reviews, less than my max number, and now the review starts as it should. I’ll test again when I get a few more pending reviews so I go over my limit!

1 Like

Oh, that is also very strange that you would get only 10 items.

I am still not having any luck replicating it. Maybe my idea was wrong, but I don’t see why else it would happen

Maybe you could add this line just after const trunctated and we’ll get some more data…

alert(`Reviews: ${items.length}\nLimit: ${limit}\nDone: ${done}\nQueue: ${truncated.length}`)

New test. Right now I have 16 pending, and now it behaves differently. I get 15 lessons like I should. I do those, return to the front page, get my last 1 review, and it works as it should.

I’ll let you know if/when I get the error again!

1 Like

I got the error again now! Limit 15 as usual, 10 reviews pending.

I started the reviews from the front page and got this.

After a refresh, got this, and then the reviews loaded as they should.

I didn’t get a screenshot of the small box that shows the number of reviews when it didn’t work, but I’ll try to get next time I see the error.

1 Like

I got the error again now.

After a refresh, it loads OK

1 Like

Ah, that is very strange. I don’t have time to look into this for a while now (moving soon), but this is good info. You can remove those lines now so you at least don’t get that message.

Question: just refreshing doesn’t solve it?

Sometimes it does, sometimes it doesn’t.

Good luck with your move, and thanks again for everything you do! I really appreciate it!