Bỏ qua đến nội dung

Zzz (not maintained & may not work) Default Easy Review Helper

Chờ xử lý #anki #addon #zzz #not #maintained #may
Unknown
7/7/2019

Cách tải addon Zzz (not maintained & may not work) Default Easy Review Helper

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

815985411

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 815985411 và copy

2

Mô tả chi tiết

An experimental very simple add-on prototype made by request. It’s entirely based on Replay buttons on card. It only adds “defease” command. The add-on can be used to press the default button using JavaScript by calling pycmd(“defease”) instead of using Space or Enter.

It’s similar to pycmd(“ans”) to show the back side of the card or pycmd(“ease3”) to press 3rd button (usually it’s Good, but can be Easy if it’s a learning card). For example, <script>pycmd(“ans”)</script> on the Front Template and no {{FrontSide}} on the Back Template can be used to create something similar to one-sided flashcards, but only on the desktop version of Anki.

The add-on can be used with typing cards to automatically skip the back side of the card and move to the next card if the typed answer was correct. But to do it, it’s necessary to add at least the following code to the back side of the card:

<script> var typeans = document.getElementById(“typeans”); if (typeans) { var incorrect = typeans.querySelector(“.typeBad, .typeMissed”); if (incorrect == null) { pycmd(“defease”); } } </script>

But the back side of the card will still be shown for a second and as a quick workaround something like this can be done instead:

  1. Wrap the Back Template with <div class=“back”>.

<div class=“back”> {{FrontSide}} <hr id=answer> {{Back}} </div>

  1. Add the following JavaScript code to the Back Template.

<script> if (document.documentElement.classList.contains(‘mobile’) == false) { var typeans = document.getElementById(“typeans”); if (typeans) { var incorrect = typeans.querySelector(“.typeBad, .typeMissed”); if (incorrect == null) { pycmd(“defease”); } else { document.querySelector(“.back”).style.visibility = “visible”; } } } </script>

  1. Add the following CSS code to the Styling:

html:not(.mobile) .back { visibility: hidden; }

Maybe sometime later it’d be better to make new add-on, don’t use CSS and JavaScript and don’t show the back side of the card if the typed answer was correct.

Nickolay <kelciour@gmail.com>


Reviews (2)

👍 2020-02-29

Thank you for sharing this.

👍 2019-07-08

Thanks! Works great!