Revision 98714 of "Template:YouTubeWithCommonsFallback" on foundationwiki

<html>
<div class="thumb">
<div class="video-commons" style="display:none;">
</html>[[{{{commons|File:The_Impact_Of_Wikipedia.webm}}}|{{{width|400}}}px]]<html>
</div>
<div class="thumbinner" style="width:</html>{{#expr: {{{width|400}}}+2 }}<html>px;">
<img class="video-placeholder" alt="" src="</html>{{filepath:{{{placeholder|Wikipedia_Puzzle_Globe.jpg}}}|{{{width|400}}}}}<html>" width="</html>{{{width|400}}}<html>" class="thumbimage">
<div class="thumbcaption" style="text-align:center;">
<p>This video is hosted by YouTube.com subject to its <a class="external text" href="//www.youtube.com/t/terms">Terms of Use</a> and <a class="external text" href="//www.google.com/intl/en/policies/privacy/">Privacy Policy</a>. If you prefer, <a id="showcommonsvideo" href="</html>{{fullurl:commons:{{{commons|File:The_Impact_Of_Wikipedia.webm}}}}}<html>">view on Wikimedia Commons</a>.</p></div>
</div>
</div>

<script>
$(".video-placeholder").click(function () {
    $(this).replaceWith(
        $("<iframe></iframe>", {
            class : "video-youtube",
            width : parseInt('</html>{{{width|400}}}<html>'),
            height : parseInt('</html>{{{width|400}}}<html>')*0.5625, //aspect ratio
            frameborder : 0,
            allowfullscreen : 1,
            cc_load_policy : 1,
            show_info : 0,
            enablejsapi : 1,
            src : "https://www.youtube-nocookie.com/embed/" + "</html>{{{youtube|3Knv6D6Thi0}}}<html>" + "?rel=0&autoplay=1&origin=wikimediafoundation.org&theme=light&modestbranding=1&color=white"
        })
    );
});

$("a#showcommonsvideo").click(function(event){
    event.preventDefault();
    $(".video-youtube").remove();
    $("div.thumbinner").css('display', 'none');
    $("div.video-commons").css('display', 'block');
});

if( mw.util.getParamValue( "commons" ) == "true" ){
    $(".video-youtube").remove();
    $("div.thumbinner").css('display', 'none');
    $("div.video-commons").css('display', 'block');
}
</script>
</html><noinclude><pre>{{YouTubeWithCommonsFallback
| placeholder = Wikipedia_Puzzle_Globe.jpg
| youtube = 3Knv6D6Thi0
| commons = File:The_Impact_Of_Wikipedia.webm
| width = 400
}}</pre></noinclude>