MediaWiki:Common.js/youtube.js

/** YouTube video creator * Creates the embedded youtube tag, rather than uploading the video to Wikia's video library * See: http://runescape.wikia.com/wiki/Template:Youtube for further documentation.. */ var youtube = $("#youtube"), content = youtube.text.split("|"), embed = document.createElement("embed"); if ("ERROR" == content[0]) { youtube.html(" You did not specify a youtube link. Please see: the documentation for help."); } else { embed.src = "http://youtube.com/embed/" + content[0]; embed.height = content[1]; embed.width = content[2]; youtube.html(embed); }