Script
TTSU Reader Word Highlighter Script
A Tampermonkey script to highlight words in TTSU Reader that you've already added to Anki, with coloring based on intervals
- Script
- #anki
- #tampermonkey
Shared by 天 Staff
Published ·Updated

Details
A Tampermonkey script designed to enhance your reading experience in TTSU Reader. It highlights words you've already added to your Anki decks, making it easier to identify known vocabulary. The highlighting is color-coded based on your Anki interval, providing a visual indication of your familiarity with each word.
Features:
* Highlights Anki-known words in TTSU Reader.
* Colors words based on their Anki interval.
* Customizable search queries and fields.
Configuration:
Before using the script, you'll need to update a few lines within the script to match your Anki setup and preferences:
`
const BULK_FETCH_BATCH_SIZE = 1000; // Fetch card info in batches (CHANGED from 1 to 100 for better performance)
const SEARCH_QUERY = 'deck:"Japan::1. Vocabulary"'; // Modify this to target specific decks if needed
const FIELDS_TO_INDEX = ['Front', 'Front_Kana']; // Fields to extract words from. Use ['Front'] for vocabulary cards, or ['Front', 'Front'] for both sides
`
Understanding `FIELDS_TO_INDEX`:
Front_Kana is not necessarily "Reading." It's "Reading" only if that word can be used as kana-only but your front is kanji-based. For example, for the word 上げる/あげる.
