Template:FR2012/Video

|px   This video is hosted by YouTube.com subject to its Terms of Use and Privacy Policy. If you prefer, view on Wikimedia Commons.



function getQuerystring( key ) { key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ); var regex = new RegExp( '[\\?&amp;]' + key + '=([a-zA-Z0-9\.\_\-]*)' ); var qs = regex.exec( window.location.search ); return qs == null ? '' : qs[1]; }

mw.setConfig( 'EmbedPlayer.RewriteSelector', null ); //$("div.commons-video").css('display', 'none');

var playerW = parseInt(' '); var playerH = playerW * 0.5625; //aspect ratio

$("#video2012").click(function {    $(this).replaceWith( $(" ", {            id : "youtube-video",            width : playerW,            height : playerH,            frameborder : 0,            allowfullscreen : 1,            cc_load_policy : 1,            show_info : 0,            enablejsapi : 1,            src : "https://www.youtube-nocookie.com/embed/" + "  " + "?rel=0&autoplay=1&origin=wikimediafoundation.org&theme=light&modestbranding=1&color=white"        }) ); });

$("a#showcommonsvideo").click(function(event){   event.preventDefault;    $("#youtube-video").remove;    $("div.thumbinner").css('display', 'none');    $("div.commons-video").css('display', 'block');    $('#mwe_player_0').embedPlayer(function{ // play the video once ready: $('#mwe_player_0')[0].play; }); });

if( getQuerystring( "commons" ) == "true" ){ $("div.thumbinner").css('display', 'none'); $("div.commons-video").css('display', 'block'); $('#mwe_player_0').embedPlayer; }