diff options
Diffstat (limited to 'assets/js/theme.js')
-rw-r--r-- | assets/js/theme.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/assets/js/theme.js b/assets/js/theme.js index 13fcd6a..5e11843 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -168,6 +168,14 @@ $(document).ready(function () { date = $(this).text() $(this).text(moment(date).format('LL')) }); + + // Youtube-2-Click-Embed + $('.youtube a').click(function(e) { + e.preventDefault(); + iframe = '<iframe class="no-js-hidden" src="https://www.youtube-nocookie.com/embed/' + $(this).attr('data-video') + '?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>'; + $(this).parent().append(iframe); + $(this).remove(); + }); }); hljs.initHighlightingOnLoad(); |