| 1 | {% load i18n %} |
| 2 | |
| 3 | {% spaceless %} |
| 4 | <img src="{{image}}" class="captcha" /> |
| 5 | |
| 6 | {% if audio %} |
| 7 | <a href="#" id="audio-button">play audio</a> |
| 8 | <a href="{{audio}}">open audio</a> |
| 9 | |
| 10 | |
| 11 | <script> |
| 12 | (function(window){ |
| 13 | document.getElementById('audio-button').addEventListener('click', function() { |
| 14 | // console.log("{{audio}}"); |
| 15 | var a = new Audio("{{audio}}").play(); |
| 16 | return false; |
| 17 | }); |
| 18 | })(this) |
| 19 | </script> |
| 20 | {% endif %} |
| 21 | |
| 22 | {% endspaceless %} |