Revision 86382 of "Template:FR2012/Video" on foundationwiki<html>
<div class="thumb tright">
<div class="commons-video" 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 id="video2012" 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" onclick="return false;" href="">view on Wikimedia Commons</a>.</p></div>
</div>
</div>
<script type='text/javascript'>
function getQuerystring( key ) {
key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' );
var regex = new RegExp( '[\\?&]' + 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('</html>{{{width|400}}}<html>');
var playerH = playerW * 0.5625; //aspect ratio
$("#video2012").click(function () {
$(this).replaceWith(
$("<iframe></iframe>", {
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/" + "</html>{{{youtube|3Knv6D6Thi0}}}<html>" + "?rel=0&autoplay=1&origin=wikimediafoundation.org&theme=light&modestbranding=1&color=white"
})
);
});
$("a#showcommonsvideo").click(function(event){
event.preventDefault();
$("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" ){
event.preventDefault();
$("div.thumbinner").css('display', 'none');
$("div.commons-video").css('display', 'block');
$('#mwe_player_0').embedPlayer();
}
</script>
</html>All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://foundation.wikimedia.org/w/index.php?oldid=86382.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|