-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Hi,
I hope it's okay for me to ask this here, I'm running into an issue with ankidroid and couldn't find the answer. I hope that by asking it here, it will be visible to others, should they run into the same issue.
I'll be short and to the point : I'm doing a pretty sophisticated template in js, but I'm really new to it.
I have this in my cloze front template :
if (navigator.userAgent.indexOf("obile") >= 0 || navigator.userAgent.indexOf("roid") >= 0 ) {
var isOnMobile = "T";
}
if (autoFlip == "T") {
if (isOnMobile == "F") { pycmd("ans"); }
if (isOnMobile == "T") { showAnswer(); }
}
This idea is that if it passes some test, the card will not show the front but automatically flip and show the answer. The behavior doesn't seem to work when in nightmode in ankidroid but works perfectly in daymode.
-
Could you give me some clues as to why it doesn't work?
-
Do you have a recommendation as to the proper way to detect mobile versions? Your wiki and github is very well written but I don't find a lot of information about AnkiMobile
-
Any recommendation as to where I can find information about what should and should work in js across all platforms? I saw in the official manual that they don't really offer support.