<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-youtube.js</id>
	<title>MediaWiki:Gadget-youtube.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-youtube.js"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=MediaWiki:Gadget-youtube.js&amp;action=history"/>
	<updated>2026-04-26T11:20:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=MediaWiki:Gadget-youtube.js&amp;diff=34690&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;/**  * YouTube video embedder  * Injects an iframe, rather than uploading the video to Wikia&#039;s video library  * See https://runescape.wiki/w/Template:Youtube for further documentation  */  ;(function ($, document) {     &#039;use strict&#039;;     if ($(&#039;.youtube&#039;).length == 0) {     	return;     }      function injectVideo() {         var tags = $(&#039;.youtube&#039;),             i,             contents,             iframe;          if (tags.length === 0) {             return;         }...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=MediaWiki:Gadget-youtube.js&amp;diff=34690&amp;oldid=prev"/>
		<updated>2024-10-16T23:10:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;*  * YouTube video embedder  * Injects an iframe, rather than uploading the video to Wikia&amp;#039;s video library  * See https://runescape.wiki/w/Template:Youtube for further documentation: &lt;/span&gt;  ;(function ($, document) {     &amp;#039;use strict&amp;#039;;     if ($(&amp;#039;.youtube&amp;#039;).length == 0) {     	return;     }      function injectVideo() {         var tags = $(&amp;#039;.youtube&amp;#039;),             i,             contents,             iframe;          if (tags.length === 0) {             return;         }...&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
 * YouTube video embedder&lt;br /&gt;
 * Injects an iframe, rather than uploading the video to Wikia&amp;#039;s video library&lt;br /&gt;
 * See https://runescape.wiki/w/Template:Youtube for further documentation&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
;(function ($, document) {&lt;br /&gt;
    &amp;#039;use strict&amp;#039;;&lt;br /&gt;
    if ($(&amp;#039;.youtube&amp;#039;).length == 0) {&lt;br /&gt;
    	return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function injectVideo() {&lt;br /&gt;
        var tags = $(&amp;#039;.youtube&amp;#039;),&lt;br /&gt;
            i,&lt;br /&gt;
            contents,&lt;br /&gt;
            iframe;&lt;br /&gt;
&lt;br /&gt;
        if (tags.length === 0) {&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (i = 0; i &amp;lt; tags.length; i += 1) {&lt;br /&gt;
            contents = $(tags[i]).html().split(&amp;#039;|&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
            // for no arguments in template use&lt;br /&gt;
            if (contents[0] === &amp;#039;ERROR&amp;#039;) {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            iframe = document.createElement(&amp;#039;iframe&amp;#039;);&lt;br /&gt;
            iframe.src = &amp;#039;https://www.youtube.com/embed/&amp;#039; + contents[0];&lt;br /&gt;
            iframe.height = contents[1];&lt;br /&gt;
            iframe.width = contents[2];&lt;br /&gt;
            &lt;br /&gt;
            $(tags[i]).html(iframe);&lt;br /&gt;
            // reverse the display:none; set in the template&lt;br /&gt;
            $(tags[i]).show();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // hide the original link as there&amp;#039;s already one in the player&lt;br /&gt;
        $(&amp;#039;.original-link&amp;#039;).hide();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    $(function () {&lt;br /&gt;
        injectVideo();&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
}(this.jQuery, this.document));&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>