[Userscript] Community Mnemonics (v0.9.7.8)

Ok, I had a problem and it seems to be fixed now, every time I loaded a page where this script was active i got the error message: "The following error occurred while trying to access the database:
“ReferenceError: Tabletop is not defined”. If the problem persists, make
sure your internet connection is working properly."

After reading the message from Inserio I recalled I use NoScript.

Adding https://rawgit.com to the whitelist fixes this. It would be nice to put this information somewhere visible. :frowning:

Samuel-H said...
Inserio said...
Samuel-H said... This happens to me as well but usually only when I reload a page before it has a chance to load or if my internet is having problems. Actually, if you're in a review, if you go to the next item it should load properly because everything else will be loaded. If you get that error on an item page then you need to refresh. If I'm wrong then tell me and I'll see if I can fix it.
 Unfortunately, it was happening every time I loaded up the reviews or lessons queue. As in, the first time I tried to load the queue. I cleared both my cookies and cache without any effect. However, turning off a bunch of the other userscripts seems to have worked for now.
It's possible that one of those scripts was somehow overwriting the link to tabletop.js that my script inserts in the head of the page. That would explain why you get it every time but it could be something else for all I know.
 I believe I have figured it out. The problem came back the next time I had reviews. I tried using Chrome as well as Firefox but both encountered the same issue. That's when I decided to go through the addons one by one to see what might be the problem.

Well it wasn't very long until I determined which one was at fault—WaniKani Override. Specifically, the unofficial 1.1.3 version.

As of now, using the 1.1.2 version on Chrome has no issue, which is unfortunate because I highly prefer Firefox and the 1.1.2 version of WaniKani Override doesn't work on Firefox anymore.

If someone is able to figure out a solution as to why these two are interfering, I would be in your debt. My programming skills are basic at best.

Are said... Ok, I had a problem and it seems to be fixed now, every time I loaded a page where this script was active i got the error message: "The following error occurred while trying to access the database: "ReferenceError: Tabletop is not defined". If the problem persists, make sure your internet connection is working properly."

After reading the message from Inserio I recalled I use NoScript.

Adding https://rawgit.com to the whitelist fixes this. It would be nice to put this information somewhere visible. :(

 I am not using NoScript. The only thing remotely similar I'm using is AdBlock Plus, and disabling AdBlock on that site does nothing for me for this issue.

Inserio said...Well it wasn't very long until I determined which one was at fault—WaniKani Override. Specifically, the unofficial 1.1.3 version.
I'm using this too and I don't get the error every time. I hardly ever get it actually.
Samuel-H said...
Inserio said...Well it wasn't very long until I determined which one was at fault—WaniKani Override. Specifically, the unofficial 1.1.3 version.
I'm using this too and I don't get the error every time. I hardly ever get it actually.
Then I'm stumped. Maybe it's processor related too? My laptop isn't the fastest thing ever, so to speak.
Inserio said...
Samuel-H said...
Inserio said...Well it wasn't very long until I determined which one was at fault—WaniKani Override. Specifically, the unofficial 1.1.3 version.
I'm using this too and I don't get the error every time. I hardly ever get it actually.
Then I'm stumped. Maybe it's processor related too? My laptop isn't the fastest thing ever, so to speak.
 I would think internet speed would be more important but I can't say for sure. I don't know if running the script with this error might affect its function or not (perhaps responsible for item duplicates) but if you just can't get it to stop, you can remove the following lines from the script:

else alert(failCount + "An error occured while trying to check the newest version of WaniKani Community Mnemonics: " + xhr.status + ": " + xhr.statusText + ". Make sure your internet connection is working " +
                       "properly and then reload the page to try again.");

These are lines 67 and 68 in version 0.9.2.6 and you'll have to repeat this with every new version if you fix it this way.
Samuel-H said...
Inserio said...
Samuel-H said...
Inserio said...Well it wasn't very long until I determined which one was at fault—WaniKani Override. Specifically, the unofficial 1.1.3 version.
I'm using this too and I don't get the error every time. I hardly ever get it actually.
Then I'm stumped. Maybe it's processor related too? My laptop isn't the fastest thing ever, so to speak.
 I would think internet speed would be more important but I can't say for sure. I don't know if running the script with this error might affect its function or not (perhaps responsible for item duplicates) but if you just can't get it to stop, you can remove the following lines from the script:

else alert(failCount + "An error occured while trying to check the newest version of WaniKani Community Mnemonics: " + xhr.status + ": " + xhr.statusText + ". Make sure your internet connection is working " +                        "properly and then reload the page to try again.");

These are lines 67 and 68 in version 0.9.2.6 and you'll have to repeat this with every new version if you fix it this way.
 I'm pretty sure 25Mbps should be fast enough, which is what I'm getting as we speak. Anyway, I suppose I'll just use Chrome for now. Thanks for the speedy replies.
Inserio said...
Samuel-H said...
Inserio said...
Samuel-H said...
Inserio said...Well it wasn't very long until I determined which one was at fault—WaniKani Override. Specifically, the unofficial 1.1.3 version.
I'm using this too and I don't get the error every time. I hardly ever get it actually.
Then I'm stumped. Maybe it's processor related too? My laptop isn't the fastest thing ever, so to speak.
 I would think internet speed would be more important but I can't say for sure. I don't know if running the script with this error might affect its function or not (perhaps responsible for item duplicates) but if you just can't get it to stop, you can remove the following lines from the script:

else alert(failCount + "An error occured while trying to check the newest version of WaniKani Community Mnemonics: " + xhr.status + ": " + xhr.statusText + ". Make sure your internet connection is working " +                        "properly and then reload the page to try again.");

These are lines 67 and 68 in version 0.9.2.6 and you'll have to repeat this with every new version if you fix it this way.
 I'm pretty sure 25Mbps should be fast enough, which is what I'm getting as we speak. Anyway, I suppose I'll just use Chrome for now. Thanks for the speedy replies.
 No problem! I have been checking this thread frequently. If Chrome works for you then great, I have mostly tested this on Chrome, particularly because of the developer tool.

This is really useful . Added a couple of mnemonics. Might be a good idea to see a place where peopl have posted all the mnemonics. 
Also, it seems the mnemonics added during a review(after you get them wrong) are not added. 

  I am not using NoScript. The only thing remotely similar I'm using is AdBlock Plus, and disabling AdBlock on that site does nothing for me for this issue.

 I jumped to conclusions too fast. :(
It definitively helped and made the script usable, but I still got the error form time to time.

sherbyspark07 said... This is really useful . Added a couple of mnemonics. Might be a good idea to see a place where peopl have posted all the mnemonics. 
Also, it seems the mnemonics added during a review(after you get them wrong) are not added. 
 This shouldn't be the case. Getting the answer right or wrong shouldn't affect whether it appears or not. There are flukes where it just won't appear and if you came to that conclusion through one incidence then it was probably one of those. If it happens every time, it probably has something to do with another script or your browser.

Nobody seems to be successfully using my duplicates test so I decided to try to build a workaround into the Google script. Hopefully duplicates will now be redirected to their already existing entry and the risk of the deletion of mnemonics won’t exist anymore. It seems to be working so far but time will tell.

Edit: It seems to be working and mnemonics should not longer be overwritten.

Are said...
  I am not using NoScript. The only thing remotely similar I'm using is AdBlock Plus, and disabling AdBlock on that site does nothing for me for this issue.

 I jumped to conclusions too fast. :(
It definitively helped and made the script usable, but I still got the error form time to time.

 I totally understand. Every time I think I figured something out to make it work, I get the same reaction. In fact, even my conclusion that Chrome was working has proven false today. However, on Chrome it only happened the first time I loaded the session. Either way, I have absolutely no idea what's going on.

Granted, I don't know what happens if this error plays out. It might not affect anything, but I'd hate for it to be something like the mnemonics not showing up.

Yay! Why is this not on the front site? PERFECT!

Its fun to share memmonics:
https://www.wanikani.com/kanji/%E6%89%80

Looks amazing. Hope to one day see this enabled on the WaniKani mobile app.

ETA: Whoops, somehow didn’t notice the edit button. Nevermind. 

Two suggestions:
1. On hover, let a text bubble show which button edits what. 
2. Maybe it’s just me, but pressing ctrl+z only edits what you’ve typed and not the code you input clicking buttons. It’s kind of frustrating.

Saphrose said...2. Maybe it's just me, but pressing ctrl+z only edits what you've typed and not the code you input clicking buttons. It's kind of frustrating.
 It would be difficult to make undo and redo work correctly with untyped text without including an extra plugin so I did the next best thing: I made it so pressing backspace will erase the most recently added tag. I'm not sure if this suffices for your issue but I'd rather keep external dependencies to a minimum. If this doesn't help at all, then your best bet is to memorize the tags and type them manually.

A nice addition would be a button to mark the extremely hard kanji/vocab (like mnemonic request) which would present a separate mark (like that for kanji/vocab that already have a community mnemonic).

gregorspv said... A nice addition would be a button to mark the extremely hard kanji/vocab (like mnemonic request) which would present a separate mark (like that for kanji/vocab that already have a community mnemonic).
 Good point. I might end up adding that eventually.

Edit: Added! I can't exactly test it on reviews or lessons because I don't have any right now but I assume it'll work properly.

Thank you very much for this userscript
I’m already enjoying it.

I tried to make the text more readable here
https://www.wanikani.com/kanji/%E8%A5%BF
but it didn’t work well. (I tried some <br> too but they were refused)