I am using Windows 10 and Anki 24.06.3 Qt6.
I’m experimenting with setting Desired Retention on a note-by-note basis, instead of being limited to the Deck Preset’s desired retention.
My current approach (which requires using the “Custom Scheduling” version of FSRS) is as follows:
- I added a new field to my note type called
Custom Retention
, which I can use to set the desired retention for each note (e.g., 0.5, 0.8, 0.99). - I added the following code to the Front template:
{{#Custom Retention}}<div id="myId" request_retention="{{text:Custom Retention}}">{{/Custom Retention}}
- I then used the code from this FSRS repository as my Custom Scheduling code. I replaced the line
"requestRetention" = 0.9,
with the following code:
// Check for an element with a specific ID to adjust requestRetention
"requestRetention": (function() {
const retentionElement = document.getElementById("myId");
if (retentionElement !== null) {
const customRetention = parseFloat(retentionElement.getAttribute("request_retention"));
if (!isNaN(customRetention)) {
return customRetention; // Use the custom retention value from the element's attribute
}
}
return 0.9; // Default retention if element or attribute doesn't exist
})(),
This approach seems to work well enough, but I’m wondering if there is a way to only override Desired Retention, without using the full “Custom Scheduling” version of FSRS.