<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://df-21.net/wiki/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-switcher.js</id>
	<title>MediaWiki:Gadget-switcher.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://df-21.net/wiki/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-switcher.js"/>
	<link rel="alternate" type="text/html" href="https://df-21.net/wiki/index.php?title=MediaWiki:Gadget-switcher.js&amp;action=history"/>
	<updated>2026-05-16T13:13:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://df-21.net/wiki/index.php?title=MediaWiki:Gadget-switcher.js&amp;diff=954&amp;oldid=prev</id>
		<title>Df21admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://df-21.net/wiki/index.php?title=MediaWiki:Gadget-switcher.js&amp;diff=954&amp;oldid=prev"/>
		<updated>2022-07-16T04:17:13Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:17, 15 July 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Df21admin</name></author>
	</entry>
	<entry>
		<id>https://df-21.net/wiki/index.php?title=MediaWiki:Gadget-switcher.js&amp;diff=953&amp;oldid=prev</id>
		<title>df-21&gt;Krinkle: Maintenance: Even more minor optimisations, tested on Template:Switcher/testcases and Broadway Hollywood Building with safemode=1</title>
		<link rel="alternate" type="text/html" href="https://df-21.net/wiki/index.php?title=MediaWiki:Gadget-switcher.js&amp;diff=953&amp;oldid=prev"/>
		<updated>2022-04-06T14:36:06Z</updated>

		<summary type="html">&lt;p&gt;Maintenance: Even more minor optimisations, tested on &lt;a href=&quot;/wiki/index.php?title=Template:Switcher/testcases&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Template:Switcher/testcases (page does not exist)&quot;&gt;Template:Switcher/testcases&lt;/a&gt; and &lt;a href=&quot;/wiki/index.php?title=Broadway_Hollywood_Building&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Broadway Hollywood Building (page does not exist)&quot;&gt;Broadway Hollywood Building&lt;/a&gt; with safemode=1&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;use strict&amp;#039;;&lt;br /&gt;
$( function () {&lt;br /&gt;
	$.each( document.querySelectorAll( &amp;#039;.switcher-container&amp;#039; ), function ( i, container ) {&lt;br /&gt;
		var selected, $radio;&lt;br /&gt;
		var switchers = []&lt;br /&gt;
		var radioName = &amp;#039;switcher-&amp;#039; + i;&lt;br /&gt;
		$.each( container.children, function ( j, switcher ) {&lt;br /&gt;
			var label = switcher.querySelector( &amp;#039;.switcher-label&amp;#039; );&lt;br /&gt;
			if ( !label || !label.childNodes.length ) {&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
			switchers.push( switcher );&lt;br /&gt;
			$radio = $( &amp;#039;&amp;lt;input&amp;gt;&amp;#039; ).prop({ type: &amp;#039;radio&amp;#039;, name: radioName }).on( &amp;#039;click&amp;#039;, function () {&lt;br /&gt;
				$( selected ).hide();&lt;br /&gt;
				$( switcher ).show();&lt;br /&gt;
				selected = switcher;&lt;br /&gt;
			} );&lt;br /&gt;
			if ( !selected ) {&lt;br /&gt;
				// Mark the first one as selected&lt;br /&gt;
				selected = switcher;&lt;br /&gt;
				$radio.prop( &amp;#039;checked&amp;#039;, true );&lt;br /&gt;
			} else if ( label.getAttribute( &amp;#039;data-switcher-default&amp;#039; ) !== null ) {&lt;br /&gt;
				// Custom default&lt;br /&gt;
				$radio.click();&lt;br /&gt;
			} else {&lt;br /&gt;
				// Hide non-default&lt;br /&gt;
				$( switcher ).hide();&lt;br /&gt;
			}&lt;br /&gt;
			$( &amp;#039;&amp;lt;label style=&amp;quot;display:block&amp;quot;&amp;gt;&amp;lt;/label&amp;gt;&amp;#039; ).append( $radio, label.childNodes ).appendTo( container );&lt;br /&gt;
			$( label ).remove();&lt;br /&gt;
		} );&lt;br /&gt;
		if ( switchers.length &amp;gt; 1 ) {&lt;br /&gt;
			$( &amp;#039;&amp;lt;label style=&amp;quot;display:block&amp;quot;&amp;gt;Show all&amp;lt;/label&amp;gt;&amp;#039; ).prepend(&lt;br /&gt;
				$( &amp;#039;&amp;lt;input&amp;gt;&amp;#039; ).prop({ type: &amp;#039;radio&amp;#039;, name: radioName }).on( &amp;#039;click&amp;#039;, function () {&lt;br /&gt;
					$( switchers ).show();&lt;br /&gt;
					selected = switchers;&lt;br /&gt;
				} )&lt;br /&gt;
			).appendTo( container );&lt;br /&gt;
		}&lt;br /&gt;
		if ( switchers.length === 1 ) {&lt;br /&gt;
			$radio.remove();&lt;br /&gt;
		}&lt;br /&gt;
	} );&lt;br /&gt;
} );&lt;/div&gt;</summary>
		<author><name>df-21&gt;Krinkle</name></author>
	</entry>
</feed>