haha yeah, I updated all the scripts to allow more versions of the URL
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.
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.
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
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.
Thanks! I finally managed to write that script for my Anki decks
A general question regarding your TTS script: is there a way to influence the pronounciation of the Google TTS? Can I somehow tell Google which reading to use for a kanji (for example by using ruby tags)? Or is it not possible to influence that?
I don’t think so, but in the script I have the option already to use kana instead of kanji in the URL, if you’re experiencing issues. Just comment out two lines which say “kanji in url” and uncomment the two which say “kana in url”.
Introducing Bunpro Autocommit 2.0
You feel like pressing a key once per review is one time too often? Well this script automatically submits an answer once you get it right! Install this and never* press enter to submit again!
*there are some pending issues with certain grammar points which do not follow the same structure as others and there will be times where you have to press enter to submit. At least for now.
But there’s no API, so how?
What I do is match the study question to the hidden, but already loaded, example sentences of the grammar point, and see what’s missing. What’s missing is, of course, the answer.
However, as explained in the asterisk above, the example sentences aren’t always the same as the question. I am working on this, but I can only patch the issues as I come across them, which is why I’m releasing it as is.
What happened with 1.0?
You don’t want to know.
Where can I get this magic?!
Introducing Auto-refocus Input Field On Furigana Toggle
Automatically refocuses the input field after you click a kanji to toggle furigana.
@Pushindawood I see you liked the script too. Since it’s so simple, do you think you’ll be able to add this as regular functionality on the site so the script isn’t necessary (and so it works on mobile)?
The refocus script is great! Thanks for that.
One question regarding the jisho button: since it opens a new window with the URL, do you think it is possible to use an Android intent as well (to open my dictionary app)? Or does intent just work within the a tag and href? I didn’t try it yet cause it’s quite uncomfortable to edit the script on my phone.
I think it should work. W3schools says window.open() is supported. I’ll check.
Later: yep, works just fine for me on Android using Firefox.
edit: oh, I misread your post. I don’t think I can search within the Jisho app.
Sorry, maybe my post was unclear. In my Anki decks I’m using links with:
…to open the Takoboto app and search for the sentence. In case Takoboto is not installed the jisho website will be opened in browser, just like with your script.
My question was if I can use this URL intent with your window.open() or if I need to change other parts of the script as well?
BTW: Takoboto is great because I can send everything to Anki with just one click. And if I search for a whole sentence, all sentence parts are shown as a list with translations and other information. All this works offline and is very neat and structured, that’s why I normally prefer the Takoboto app. Of course Jisho is more common so it makes sense to use that for your script.
Oh. I have no idea if that would work.
Yeah, it works! I needed forever to edit the code in tampermonkey on the phone but finally this works:
//add button buttonsBar.addButton(‘JishoButton’, ‘Jisho’, ‘window.open(‘intent:#Intent;package=jp.takoboto;action=jp.takoboto.SEARCH;S.q=’ + parseSentence($(’.study-question-japanese > span’)) + ‘;S.browser_fallback_url=https://jisho.org/search/’ + parseSentence($(’.study-question-japanese > span’)) + ‘;end’)’ );
Thanks again for your great scripts!
Might be easier to just edit the script on your computer and post it as a private script to Greasyfork. (I.E. fork it )
Can you make the jisho script replace regular question marks with the japanese version?
Cuz jisho doesn’t look at anything past the question mark