[Userscript] Dashboard Apprentice

Bug report. Sometimes the popup falls off the screen on the right.

Apprentice1

Apprentice2

Yea, Toyger mentioned the same a few days ago. This script is really not a priority, but maybe I should set a max width and make it wrap instead

An alternative is to shift the popup position relative to the icon to the right instead of being centered. There is CSS for that. Items are concentrated on the left edge of the screen so there is not much risk of falling off the edge at the right…

Hmm, I will consider it

Nah, mine are just as close to the right side :rofl:

v1.2.0

  • Extended SRS range: you can now choose starting and ending SRS stage for display. Of course defaults are 1-4, the apprentice stages
  • Add setting for which item types to display. Figured some users might not care for all types (also it was useful for testing the next thing)
  • Better handling of SVG radicals. You shouldn’t notice any difference

For information. I still have very large popups. Any risk they fall off the screen when they are close to the edge?

popup

I don’t know if you are interested but this is how how play audio on a click. I had to research it for Item Inspector.

You must insert this script element in your html.

<script type="text/javascript">
   function playAudio(id){
      gender = ["male", "female"][Math.floor(Math.random()*2)]};
      id += gender;
      document.getElementById(id).play();
      };
</script>

Then you configure your clickable element like this:

<audio id="audioIdmale">
    <source src="'soundUrloggForMale'" type="audio/ogg"></source>
    <source src="'soundUrlmpegForMale'" type="audio/mpeg"></source>
     'our browser does not support audio
</audio>
<audio id="audioIdfemale">
      <source src="'soundUrloggForFemale'" type="audio/ogg"></source>
      <source src="'soundUrlmpegForFemale'" type="audio/mpeg"></source>
      Your browser does not support audio
</audio>
<a onclick="playAudio('audioId');">Clickable text</a>

This will randomly select the male voice or the female voice. If you prefer a double click use ondblclick instead of onclick in the <a> tag.

I haven’t done anything on this yet. Focus is still to get Heatmap done. I will most likely make the meanings and readings wrap

Unless you need an audio element you can actually play audio with JS alone. It’s what I do with the Burn Bell script.

audio = new Audio(URL);
audio.play();

Thanks. This is good to know.

I need clickable audio elements. This is why I do it this way.

Sadly this script stopped working on firefox today. Can anyone do something? Please.

The script has been updated to work again. I also added support for kana-only vocabulary.
Let me know if you have any issues with version 1.2.2.

thank you, however the same problem still exists.
It seems to run, as I can open the settings menu, but it doesn’t display anything on the dashboard.
When I open the edit window on tampermonkey, it gives me lots of warnings, that wkof is undefined. Could that be the problem?

Please double check that you are indeed on version 1.2.2. It works fine for me on Firefox

:eyes:

Is there a way to better place this? It’s not centering properly in-between these two other things. Unfortunately I don’t know what I’m doing and I dont want to break this :sweat_smile:

It is and I reinstalled it several times. The script is running, but I don’t see it, it’s not displaying.

Yeah, I’ll improve that

Are you running any other scripts?

Should be better in version 1.2.3

I did already add a setting for this, although I doubt you would want to use it with that many guru items