Template:YouTubeWithCommonsFallback: Difference between revisions
Content deleted Content added
optional |
No edit summary |
||
Line 45:
</div><!-- /video-outer-wrapper -->
<script>
/* Wrapper function so waits until jQuery ready - see MediaWiki:Common.js */
$(this).replaceWith(▼
$("<iframe></iframe>", {▼
class : "video-youtube",▼
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"▼
})▼
);▼
});▼
$("
▲ $(this).replaceWith(
▲ $("<iframe></iframe>", {
showCommonsVideo();▼
▲ class : "video-youtube",
▲ 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){
if( mw.util.getParamValue( "commons" ) == "true" ){▼
▲ showCommonsVideo();
▲ });
▲ if( mw.util.getParamValue( "commons" ) == "true" ){
showCommonsVideo();
}
}
|