Field replacement for card Ease

Ease changes have a heavy effect on review times and it is almost impossible to remember how many times has “hard” been pressed for a specific card.

I would like to add a field replacement (something like {{Ease}}) in the back of the template in order to see the current Ease value before changing it.

I found a solution that might work:

  1. First install the add-on additional card fields
  2. On your card template, go to the back and add this code at the bottom:
<div class=cardinfo>___</p>
Ease: <span id="data">{{info-Ease:}}</span>%
var ease = document.getElementById("data").innerHTML;
if(ease>0 && ease<=210) document.getElementById("data").style = "color:orange"; 
if(ease>0 && ease<=190) document.getElementById("data").style = "color:red"; 

Thanks! That was a quick answer.

I have added some logic to hide the text if the add-on is not installed or if a different Anki client is used.
Still, I think it would be nice to have official support for this feature.

<div id="ease-div">
  Ease: <span id="ease-value">{{info-Ease:}}</span>%

  let ease = document.getElementById("ease-value").innerHTML;

  if(ease === ""){
    document.getElementById("ease-div").style.display = "none";
  else if(ease > 0){
    if(ease <= 190 || ease >= 310){
      document.getElementById("ease-value").style = "color:red";
    else if(ease <= 210 || ease >= 290){
      document.getElementById("ease-value").style = "color:orange";
1 Like

Still, I think it would be nice to have official support for this feature.

I agree. It would be nice to use vanilla JavaScript to access card metadata like “ease%” and “last review date”, but I don’t think these are available as an API for JS.

These seem to be the only “vanilla” metadata you can access: (source)

The note's tags: {{Tags}}

The type of note: {{Type}}

The card's deck: {{Deck}}

The card's subdeck: {{Subdeck}}

The type of card ("Forward", etc): {{Card}}

The content of the front template
(only valid in back template): {{FrontSide}}

Actually, I found this comment that might be useful.

Thanks again!