List of Scripts

I think this should work just fine. You can add as many buttons to it as you please.

Update available → https://greasyfork.org/en/scripts/369927-bunpro-jisho-button

Also for copying script → https://greasyfork.org/en/scripts/369995-bunpro-copy-sentences

@seanblue If you want some buttons I updated the script

3 Likes

Wonderful! Looks and works great on mobile:

You should consider to combine all scripts into one big script and name it “Bunpro improved” :wink: That script would have the following buttons:

| Copy EN | Copy JP | Jisho | TTS on/off | Header on/off | Show JLPT | Show Streak |

That script could then also be implemented in the Android app since that app uses the webview of the Bunpro site.

One small thing: can you reduce the height of the buttons and the font size a bit so that it matches with the “english” and “submit” buttons?

1 Like

Not a bad idea, however don’t you think that would get a bit cluttered?
Mockups for mobile:

Oh, oops, forgot to put that piece of code back. It’s fixed!

1 Like

Hehe, and you can add the “Show Timer” button as well. Right, that’s too much. But you could just use a three dot menu or an “arrow down” symbol to show/hide this button menu.

Or if the buttons have symbols instead of text it would look less cluttered, as in Wanikani:

But I think that goes too far.

Anyway: there is still one small issue with the copy script: when clicking on a kanji to toggle furigana the script copies the whole sentence. I think it’s enough to have the button, no need to trigger the script when clicking on the sentence itself

1 Like

I’ll leave them as separate scripts for now. In the future I might just put them together and create a menu where you can choose which features you want.

Sure, I suppose I could remove that feature at this point. I’ll leave it for example sentences though.

Done.

2 Likes

I have installed most scripts
image
however, none of them actually show up in my tampermonkey. Not during lessons, or reviews :thinking:

any idea what could cause this?

Edit: Ok i feel silly, but I figured it out :stuck_out_tongue: i had bookmarked www.bunpro.jp and in the scripts it is bunpro.jp without the www.
Good to know if others have that issue, or they can just add another url to the scripts to include both
:man_shrugging:

3 Likes

Your scripts are really a huge benefit for the site, I use the copy and jisho buttons all the time. However, today the copy buttons didn’t appear in the button menu, I just see the jisho button.

And a funny thing, the font size of the grammar point in study mode becomes huge when using the header script. It fills the whole screen:

Can you deactivate it during learning sessions? It is only useful in reviews when users have to type something and the keyboard is on.

1 Like

Will fix asap!


edit: done!

3 Likes

Sure, no problem.


edit: done!

2 Likes

I should probably start making new posts for scripts at some point, but for now I’ll keep posting here.

Added Streak Chart Additions. This scripts adds two new bars; one for unlearned items and one for items with streak 0. It also adds interval info to the hover tooltip, and changes out “Streak” for “Count”.

Example:

And this is from my test account, to show the unlearned bar.


edit: removed color box in tooltip label
image

2 Likes

You’re my new favorite person, yesterday and the day before i got most of your wanikani scripts, and now here too. thanks for the effort you put in and sharing them with us!

2 Likes

(✪ ᴗ ✪ )

4 Likes

Took a nap, came back to pc and a bunch of tabs had magically appeared…

image

Someone has been busy:P

1 Like

haha yeah, I updated all the scripts to allow more versions of the URL

2 Likes

All scripts are working now perfectly again. Only the TTS script is playing the first of the example sentences when autoplay audio is turned on. But that’s not a big deal, the real Bunpro audio will play the correct sentence after that.

And one question for the summary page:

Can your streak script show the streak number for every grammar point in the summary as well? The summary is not very useful without any streak indicator but I don’t think Bunpro will add an indicator by themselves.

1 Like

Hide header script will now be retired.


@Anthropos888 Im working today but I will look into that when I get home.

As for the streak script I could probably order the items by SRS level.

1 Like

Looks almost the same now. Did Bunpro use your code or did they write their own code? I still like your script better since it removes the Guide button and places a Home button instead. Please don’t remove the script from Greasyfork.

I don’t think there is anything I can do about this.

I see that you added the class, however the first audio element is now also being played. @Anthropos888 reports the BP audio being played after my TTS, however I hear them simultaneously. I imagine that just a matter of browser differences though. This happens with auto-play as well as when you press the play button. I understand that dealing with this is not a priority, so I’m grateful for your time.

I thought about it, but no. The thing is that the way I get the streak is not very efficient. Fetching it for all summary items would not be realistic. The way I do it is that I request the item’s grammar page in the background and check the streak displayed there. It’s slow and it’s quite frankly a bad way to do it. Until there is an API I doubt anything like that will be made. I wouldn’t be surprised if they added it natively though.

It’s a really simple change, so they wouldn’t need my code. All they’d need is something like an if statement when loading the page where as my code had to be a bit more complicated than that.

Don’t worry, I just removed it from the list

1 Like

Sorry, I have an offtopic question: do you know how to merge kanji and reading with javascript?
Let’s say I have the sentence: 彼女は三人の子供の母親だ。
And I have the reading: かのじょはさんにんのこどものははおやだ。
How can I get this output: 彼女[かのじょ]は 三人[さんにん]の 子供[こども]の 母親[ははおや]だ。
Is there a short and simple way do this or is more information needed that just the sentence in kanji and in kana?
Thanks a lot!

I think that should be doable as long as you’re fine with longer sequences of kanji bring represented by only on bracket. In that case you just need to match the kana in the reading with the kana in the kanji version and see what’s missing.

1 Like