Skip to content

Instantly share code, notes, and snippets.

View KamWithK's full-sized avatar
🐼

Kamron Bhavnagri KamWithK

🐼
View GitHub Profile
@KamWithK
KamWithK / dual_dictionary_mine.handlebars
Created April 11, 2023 04:11
Yomichan handlebar to English and Japanese definitions into separate fields
{{#*inline "glossary-single"}}
{{~#if (op "&&" (op "||" (op "===" (get "chosen-non-mono") false) (op "===" (get "chosen-non-mono") dictionary)) (op "===" isMono undefined))~}}
{{~#if (op ">" glossary.length 1)~}}
<li>
{{~/if~}}
{{~#if (op "<=" glossary.length 1)~}}
{{~#multiLine}}{{#regexReplace "^[^\n]*\n" ""}}{{glossary.[0]}}{{/regexReplace}}{{/multiLine~}}
{{~#set "chosen-non-mono" dictionary}}{{/set~}}
{{~else if @root.compactGlossaries~}}
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{#unless @last}} | {{/unless}}{{/each}}