-
-
Save rb2k/e7bc5bed0f092090a9d5 to your computer and use it in GitHub Desktop.
I hate liquid
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
diff --git a/source/_includes/article.html b/source/_includes/article.html | |
index 68ead11..5670955 100644 | |
--- a/source/_includes/article.html | |
+++ b/source/_includes/article.html | |
@@ -34,12 +34,25 @@ | |
{% endif %} | |
{% if podcast_audio %} | |
+<script src="http://bitlove.org/widget/base.js" type="text/javascript"></script> | |
<div class="audio-content"> | |
{% audio podcast_audio %} | |
<p id="download-buttons"> | |
{% for url in podcast_audio %} | |
<a href="{{ url[1] }}"><img src="{{ root_url }}/images/audio_{{ url[0] }}_button.png" | |
title="download {{ url[0] }}" alt="download {{ url[0] }}" style="border:0; border-radius:0;" /></a> | |
+ {% if url[0] == 'mp3' %} | |
+ <a class="torrentlink' mp3link="{{ url[1] }}" href=""><img src="http://bitlove.org/static/bitlove-button.png" title="download torrent for {{ url[1] }}" alt="download torrent for {{ url[1] }}" style="border:0; border-radius:0;" /></a> | |
+ <script type="text/javascript"> | |
+ torrentByEnclosure("{{ url[1] }}", function(info) { | |
+ if (info){ | |
+ var torrent_link = info['{{ url[1] }}']['sources'][0]['torrent']; | |
+ $("a[mp3link='{{url[1]}}'].torrentlink").attr('href', torrent_link); | |
+ } | |
+ }); | |
+</script> | |
+ | |
+ {% endif %} | |
{% endfor %} | |
</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment