Created
July 25, 2016 13:31
-
-
Save kelciour/59d6e18b4da410c4327655745400730a to your computer and use it in GitHub Desktop.
Anki. English Grammar In Use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================== | |
Добавить в Styling | |
================== | |
.replaybutton { content:url("AUDIO-2x.png"); width:22px; } | |
a img { width:22px; } | |
================== | |
====================== | |
Заменить Back Template | |
====================== | |
{{H1}} | |
{{H2}} | |
{{BODY}} | |
<div id="sound" style="display:none;">{{SOUND}}</div> | |
<script> | |
sound = document.getElementById("sound").innerHTML | |
arr = sound.replace(/><a/g,">|<a").split("|") | |
content = document.body.innerHTML | |
for (var i = 0; i < arr.length; i++) { | |
content = content.replace(/<a><[^<]*src="AUDIO-2x.png"[^>]*><\/a>/, arr[i]) | |
} | |
document.body.innerHTML = content | |
</script> | |
====================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment