AnkiDroid JavaScript API allow deck developer to add functionality to cards that can call native functions defined in AnkiDroid. This can be used to design whole new layout for buttons, cards info, top bar card counts, mark, flag etc.
But Anki Desktop there are no official support like this JS API.
Image
So, this is Anki addon for supporting the AnkiDroid-JS-API.
Download AnkiJS API Addon
View Source Code
Usages
To know more about the options view AnkiDroid-JS-API. New Count
Learn Count
Review Count
Mark
Flag
Card Id
Note Id
Deck Id
Last modified time of card
Type
Queue
Left
Due
Interval
Factor
Reps
Lapses
Original Due
Deck ID of home deck if filtered
Next Time 1
Next Time 2
Next Time 3
Next Time 4
pycmd("AnkiJS.ankiGetNewCardCount()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetLrnCardCount()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetRevCardCount()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardMark()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardFlag()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardId()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardNid()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardDid()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardMod()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardType()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardQueue()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardLeft()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardDue()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardInterval()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardFactor()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardReps()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardLapses()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardODue()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetCardODid()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetNextTime1()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetNextTime2()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetNextTime3()", (ret) => {
console.log(ret);
});
pycmd("AnkiJS.ankiGetNextTime4()", (ret) => { console.log(ret);
});
Comments
Post a Comment