Created
August 2, 2020 23:13
-
-
Save sartak/4a4a718c7d7ea05da7fd3551c975aa00 to your computer and use it in GitHub Desktop.
JavaScript for PC Anki (v2.1.19) and iOS AnkiMobile (2.0.63) to enable the card to automatically advance to the answer side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note: This assumes for iOS AnkiMobile that a midCenter tap advances to the answer side) | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
// see https://gist.github.com/sartak/581d3564dc42b689b604 | |
if (window.anki && window.sendMessage) { | |
// delay to give Anki a chance to continue processing | |
setTimeout(function () { | |
window.sendMessage("ankitap", "midCenter"); | |
}, 100); | |
return; | |
} | |
if (window.pycmd) { // PC | |
pycmd("ans"); | |
return; | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment