[Anki Deck Template] WK Anki, Crihak's Flavor

I believe the underscore is to let anki know that it’s a media file that should be kept even if it’s not referenced on any card.

Since you’ve got it working with my files, maybe you can start from there and see if you can figure out what’s wrong?

When I’ve got two things that to me seem like they should function identically, but for some unfathomable reason only one of them does what I expect, I sometimes start from the one that works and try to transform it into the other.

So maybe a starting step could be to modify my files and see if you can get that to work… then maybe rename them? If that works, or you can figure out why it doesn’t, you should be able to continue.

Also: one trick that can get you around the caching issue I mentioned in the last post is to add a useless parameter to the file name when linking to your javascripts:

src="_myfile.js?somepar=whatever"

and then when you’ve made an update you can change it:

src="_myfile.js?somepar=whatever2"

Even though it’s the same file, anki will think it’s completely new and reload it rather than fetch it from the cache.

This doesn’t work in the mobile version though, so when you’re ready to use it in the app, you’ll need a fresh filename I think.

Thank you for the feedback. I took your advice and compared your files to mine and was able to find the issue. Of course it was something simple. Once I knew what I was looking for I made quick progress.

The caching issue is an interesting problem. Is there no way to clear the cache and have Anki reload the new files without your work around? I did some google searching, but haven’t come across anything yet.

1 Like

That’s only an issue while you’re developing. Once you have things working the way you want, the caching is a desirable feature, since it’ll speed up load times

Understood. I’m just curious if there is a way to refresh while developing.

With web browsers, you can disable the cache through the built in dev tools. Not sure about anti though

Cool that you found the issue! :slight_smile:

My gut feeling is that you can’t disable the cache unfortunately… since anki was never really built for this kind of thing (as I understand it, the ability to use javascript at all is mostly just a byproduct of anki using html for the cards). So I don’t think there’s really any effort made to make it developer friendly.

I know too little (close to nothing actually) about plugins, så maybe it’d be possible via those, but if there was a cache-disabling plugin one would expect it to turn up in a google search…

Fortunately I didn’t have to do too many versions before being satisfied.

Here’s a sample of what my current setup looks like if you want to check it out.

[Template Perfect Form - maybe]

Also how has the timer and multiple choice features you implemented been working out for you? I’m curious since it’s not something I’ve got around to trying out yet.

Thanks again for your help. :+1:

2 Likes

You’re welcome!

I actually disabled both multiple choice and timer some time ago :slight_smile:

Multiple choice was too lenient I found (I noticed that I encountered the words IRL and didn’t remember what they meant…). So I think they might have been a bad idea actually… :slight_smile:

I felt the timer was a good time-saver when I used it on WK, but right now I’m thinking that I probably want to give myself the time to read things properly.

2 Likes

Um… I’d love this, but without having to write the answer (that is, I’d prefer the classic Anki mode but with this styling). How can I achieve that? I’m a total Anki noob :sweat_smile:

The easiest way would be to just hit enter and don’t care that the input field is red (anki doesn’t care, you still need to grade yourself on each answer whether you typed it or not) :slight_smile:

If its existence bothers you, you can go edit -> cards and then delete the {{typeans:blah}} part on both sides

1 Like

Haha, it did bother me since I felt like I was being scolded by a teacher :sweat_smile: Thank you for the solution, this is wonderful!

1 Like

Hi, hinekidori. Do you, by any chance, have 10k Core vocab deck with this template?

1 Like

Here you go.

[ So Much Vocab! ]

It’s not the same, there are no panels on the back

If all you want is the core10k content with my template, maybe this will help?

Ah sorry. Here is the updated version.

https://mega.nz/#!8cQ03D5a!TVd3-buphRBaZMq8q9fAu0iWcOUIOzXdCM7nCsCplcY

2 Likes

It’s a bit complicated for me xD. Your deck contains a lot of subdecks and I’m not sure how to correctly import CSV file.

Thank you!

Yeah, I kinda made it for myself so unfortunately that means it wound up a bit “developer-friendly” :slight_smile:

Good thing @hinekidori had what you were looking for!

Hi @hinekidori thank you for your awesome templates!

There’s something in the code that causes errors on the latest AnkiMobile version. It might have something to do with the

***** The back displays fine if I have “Never Type Answer” option turned off in AnkiMobile *****

The issue occurs on your most recent template:

I get the following errors on the Vocab Recall cards, both front and back:

  • Invalid HTML on card: TypeError: null is not an object (evaluating ‘a.addEventListener’)

I get this error on the Vocab Recognition card; the front displays correctly but the back shows this error:

  • Invalid HTML on card: TypeError: null is not an object (evaluating ‘document.getElementById(‘typeans’).childNodes’)

I’m sorry to bother you, but I don’t know anything about editing the code to fix this. I really want to continue using your template on Anki Mobile.

Could you please help my fix this? Thank you!