Skip to content

Instantly share code, notes, and snippets.

@liquidx
Created June 11, 2018 11:21
Show Gist options
  • Save liquidx/b95606ae496c393fc27445861dbe9550 to your computer and use it in GitHub Desktop.
Save liquidx/b95606ae496c393fc27445861dbe9550 to your computer and use it in GitHub Desktop.
{{^ShuffledSent_ja}}
<notext1><nokana>
<div class="sentence1 shadow">{{kanji:Sentence J}}</div>
</nokana></notext1>
<div class="sentence2 shadow">{{Sentence E}}</div>
{{/ShuffledSent_ja}}
{{#ShuffledSent_ja}}
<div class="shuffle">{{ShuffledSent_ja}}</div>
{{type:AnswerSent_ja}}
{{hint:Sentence E}}
{{/ShuffledSent_ja}}
<script>var isSP = ' '; var notmarginSP = ''; function copytext(text) {text += notSP; var textField = document.getElementById("typeans"); var caretPos = textField.selectionStart; var front = (textField.value).substring(0, caretPos); var back = (textField.value).substring(textField.selectionEnd, textField.value.length); textField.value = front + text + back;} function remtext(text) {text += notSP; var textField = document.getElementById("typeans"); textField.value = textField.value.replace(text, "");} function copyrem(text, e) {if (e.className == "copyt") {e.style.background = "dimgray"; e.className = "rem"; copytext(text);} else {e.className = "copyt"; e.style.background = "inherit"; remtext(text);}}</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment