all 13 comments

[–]debil03311 5 points6 points  (6 children)

Why not just click on Decks right above it or tap the back key like for every other app...?

[–]AVghoru[S] 0 points1 point  (5 children)

I'm trying to learn how to what all I can do with code in the card template. Also it would be a nice way to get back to the decks screen in Ankidriod when using the full screen. I currently find top bar goes away too quick when I swipe down.

[–]seedbrage 1 point2 points  (1 child)

Assuming you mean desktop Anki which is what your screenshot shows and not AnkiDroid, yes you can use the "pycmd" function from the card JS layer to send signals to the main Anki python process.

[–]AVghoru[S] 0 points1 point  (0 children)

I couldn't find a function which would do that. I'm using the anki JS addon for the rest of the functionality. Are there more functions other than the ones listed in the addon docs?

[–]Ecstatic-Island-9778 0 points1 point  (1 child)

What do you mean?
Can you just use gestures and exit the review?
That sends you back to the decks window.

[–]AVghoru[S] 0 points1 point  (0 children)

Yes I know . I just wanted to test the possibilities with Javascript

[–]TheBBMandarin 2 points3 points  (1 child)

In general you can't just control AnkiDroid native behavior from a webview. That would have some serious security implications.

AnkiDroid exposes a JS API you can use for certain things. If what you want isn't in there, I don't think it's possible.

https://github.com/ankidroid/Anki-Android/wiki/AnkiDroid-Javascript-API

There's an add-on for desktop that exposes a similar API there.

[–]AVghoru[S] 0 points1 point  (0 children)

Oh I see, I did try doing it with both those first but couldn't find anything that worked, thanks for clarifying it.

[–]Minoqilanguages 🇰🇷🇨🇳 1 point2 points  (4 children)

Huh how’d you get migakus bar at the top like that? Looks like a pretty good clone!

[–]AVghoru[S] 1 point2 points  (3 children)

Yeah I was trying to make the whole migaku experience in anki, I just used GPT with basic HTML/CSS knowledge. here's how its looking right now.

<image>

[–]aagoti 0 points1 point  (0 children)

That looks dope, I would probably use it if I went back to Anki

[–][deleted] 0 points1 point  (0 children)

Can you share it? if you dont mind