<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.byte.pm/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ACommon.js</id>
	<title>MediaWiki:Common.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.byte.pm/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ACommon.js"/>
	<link rel="alternate" type="text/html" href="https://wiki.byte.pm/index.php?title=MediaWiki:Common.js&amp;action=history"/>
	<updated>2026-11-14T15:52:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.byte.pm/index.php?title=MediaWiki:Common.js&amp;diff=534&amp;oldid=prev</id>
		<title>Frozen byte: Collapsible level-3 headings</title>
		<link rel="alternate" type="text/html" href="https://wiki.byte.pm/index.php?title=MediaWiki:Common.js&amp;diff=534&amp;oldid=prev"/>
		<updated>2026-11-10T14:28:18Z</updated>

		<summary type="html">&lt;p&gt;Collapsible level-3 headings&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/* Make level-3 headings (=== ... ===) collapsible like the skin&amp;#039;s level-2 sections.&lt;br /&gt;
 * Reuses Citizen&amp;#039;s own classes, so its click handler and styles do the rest. */&lt;br /&gt;
mw.hook( &amp;#039;wikipage.content&amp;#039; ).add( function ( $content ) {&lt;br /&gt;
	if ( !document.body.classList.contains( &amp;#039;citizen-sections-enabled&amp;#039; ) ) {&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
	$content.find( &amp;#039;.citizen-section &amp;gt; .mw-heading3&amp;#039; ).each( function () {&lt;br /&gt;
		var heading = this;&lt;br /&gt;
		if ( heading.classList.contains( &amp;#039;citizen-section-heading&amp;#039; ) ) {&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
		var body = document.createElement( &amp;#039;div&amp;#039; );&lt;br /&gt;
		body.className = &amp;#039;citizen-section&amp;#039;;&lt;br /&gt;
		var next = heading.nextElementSibling;&lt;br /&gt;
		while ( next &amp;amp;&amp;amp; !next.matches( &amp;#039;.mw-heading2, .mw-heading3&amp;#039; ) ) {&lt;br /&gt;
			var after = next.nextElementSibling;&lt;br /&gt;
			body.appendChild( next );&lt;br /&gt;
			next = after;&lt;br /&gt;
		}&lt;br /&gt;
		heading.after( body );&lt;br /&gt;
		heading.classList.add( &amp;#039;citizen-section-heading&amp;#039; );&lt;br /&gt;
		var icon = document.createElement( &amp;#039;span&amp;#039; );&lt;br /&gt;
		icon.className = &amp;#039;citizen-section-indicator citizen-ui-icon mw-ui-icon-wikimedia-collapse&amp;#039;;&lt;br /&gt;
		heading.prepend( icon );&lt;br /&gt;
	} );&lt;br /&gt;
} );&lt;/div&gt;</summary>
		<author><name>Frozen byte</name></author>
	</entry>
</feed>