List of Scripts

Neato! I like the cute lil .forEach at the end of the script. One small request though. @include includes only /study but script works flawlessly for cram sessions also, I couldn’t figure out what Grease monkey wants in that directive to add /cram so I changed it to bunpro.com/*, and it seems that this change got lost.

Thank you, that works fine :slight_smile:

Indeed it doesn’t work for sentences like
これ [put answer here]です。
(That’s why I really like the fact that now hint can be turned back on on-the-fly.) But when the sentence is somewhat long and contains an isolated situation, it’s really fun trying to untangle it. Just like when you overheard someone on the street and now trying to reconstruct the full picture.

Also, some hints are a ridiculous giveaway, for example, if I see [long form て + いく] in a text, erm, the whole sentence is abundant, I can type the answer simply from this hint. And to be completely honest I did that a lot for some grammar points.

2 Likes

Done! Sorry, I saw that you said it worked on cram pages but missed the edit that made it work! For some reason the space key toggle only worked outside the input on cram at first, but after a few refreshes it seems to be working inside and outside of the input. Let me know if you spot any odd behaviour!

I have noticed the script doesn’t seem to work for some sentences/hints, but for now I haven’t worked out quite why - the ones I’ve seen still seem to meet the criteria of what the code is targeting, but I must be missing something. But perhaps that’s desired behaviour based on those sentences/hints being of some particular type.

Interesting! I feel like I haven’t gotten quite far enough with my Bunpro journey yet to find these kinds of really obvious hints, but I might actually use the script a bit more once I do!

1 Like

with that modification, keys 1,2 and 3 are working fine now. I can use my left hand only.

if it would be possible to add also keys 7,8 and 9 (in case I want to use just the right hand), it would be a great addition too.

If you want to use keys 7, 8 and 9 in addition to 1, 2 and 3 replace the code you had originally added with this:

document.onkeyup = function(e) {
  if (e.which == 50 || e.which == 56) { //Shows answer
    $("#show-answer").click();
    $("#study-answer-input").val($(".study-area-input").first().text());
  } else if (e.which == 51 || e.which == 57) { //Submits answer as correct
    $("#submit-study-answer").click();
  } else if (e.which == 49 || e.which == 55) { //Submits answer as incorrect
    $("#study-answer-input").val("あああああああ");
    $("#submit-study-answer").click();;
  }
};

7 submits as incorrect, 8 shows, and 9 submits as correct.
If you want to change the keys you’re using, you can look up their alt-code here. For example if you wanted to change show answer to the “s” key, (but keep 2 as a second option) you’d change the number inside the parenthesis like this:
if (e.which == 50 || e.which == 115) { //50 represents the "2" key and 115 represents the "s" key.

If you want to add even more options for keys to use, you can add: || e.which == "alt-code-here" inside the parenthesis after the last number.

1 Like

Oh. By the do not work, I meant in a metaphorical way, as in script hides the hint even though it’s essential for some sentences. For me, it functions great, I’ve yet to encounter grammar points for which the script is not working literally.

it is working for the numbers on the left side of keyboard

the alfa numeric keyboard on the right side (num lock is enabled) is not working, is it related to that 55, 56 and 57?

How do I know the specific number for the key to change the code?

Sorry I didn’t realize you were wanting to use the number pad. The numbers can be found here for each key on the keyboard. Change 55, 56 and 57 to 103, 104 and 105 (103 is 7, 104 is 8 and 105 is 9).

1 Like

Still working okay? Maybe for me it was just a weird caching thing, but not sure why it only didn’t work on a small few.

Nope, works well for me. Although I wiped the site’s stored data a few times checking a new update, maybe that helped by accident.

P.S. By the way underscores look prettier with the new font, there is totally no gap in between them

I suspect there is something wrong with how I detect that you go to the reviews page. You can confirm this by checking if it always works when you refresh on the reviews page. If that is the case, then there are two possible causes, either wfs or Helpful Events. Since you say it works sometimes (and you don’t get any errors when it doesn’t), and Helpful Events is just using wfs, I suspect it must be wfs. If wfs is the problem, then I see two possible causes.

  1. jQuery is not defined before it runs. Since you don’t have an error for this, I suspect it is not the case. Either way, I have removed jQuery from the script.
  2. The mutationObserver stops working. I can only see this happening when the root <HTML> element itself is replaced, since that is what it is observing. Can you tell if it is being altered when you switch page?

Or, perhaps, does it load a completely new page when you go to reviews? If that is the case it might just be a race condition

Is there a script for automatically focusing on the input field when I first click on reviews?
I mean, when I click on Reviews, to do them, I’d either have to click on a kanji or click on the input field to be able to enter any input.
I’d like to be able to enter input from the beginning without clicking every time I plan to do my reviews.
Not anything big, just a small quality of life change!

Sorry, dropped off on my Bunpro work again so never got around to testing it. Could probably do so this week if it would still be helpful?

Still looking for this? Something I included in the script to toggle tense info should be able to be reused for this purpose if so

I use anki mode script and same happens to me: I have to click first on the sentence to get the 1,2,3 keys to be recognized.

Just checked it with Firefox 95, and there was an autofocus on the input field immediately without any additional clicks. Maybe some extensions are messing with your Bunpro tab?

is there a script to practice ‘failed last grammar points’ ? Just like WK is doing with extra study.

2 Likes

Isn’t that what ghost reviews is for?

1 Like

Holy crap I just had the same Idea as that!

1 Like

They are but the problem is you have to wait for a ghost review, and ghost reviews are really just designed for something that you’ve learned but accidentally forgot and are there to reinforce it. Not really there for helping learn new things. If you could instantly also redo lessons you got wrong you wouldn’t need to wait and you could actively learn something that you are new to or struggling with. That’s just how I feel tho

2 Likes

Hi!

I’ve modified the script “Bunpro: copy sentences” and i was wondering about how to share what i’ve done.
There is still the problem of “many buttons” (instead of two) going on with this script but at least i can copy japanese and english sentences without problem: For example:

まだ食べたり、____。[飲む] I am still doing things like eating and drinking.

1 Like