<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.brucecooper.tv/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.brucecooper.tv/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ACommon.js"/>
	<link rel="alternate" type="text/html" href="https://wiki.brucecooper.tv/index.php?title=MediaWiki:Common.js&amp;action=history"/>
	<updated>2026-09-29T04:31:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.brucecooper.tv/index.php?title=MediaWiki:Common.js&amp;diff=61&amp;oldid=prev</id>
		<title>Admin: Drop the Main page button; the rail logo already links there</title>
		<link rel="alternate" type="text/html" href="https://wiki.brucecooper.tv/index.php?title=MediaWiki:Common.js&amp;diff=61&amp;oldid=prev"/>
		<updated>2026-08-13T01:04:23Z</updated>

		<summary type="html">&lt;p&gt;Drop the Main page button; the rail logo already links there&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:04, 13 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l26&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	// No Main Page entry: the logo at the top of the rail already links there.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	var items = [&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	var items = [&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		{ title: &#039;Main Page&#039;, icon: &#039;home&#039;, label: &#039;Main page&#039; },&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		{ title: &amp;#039;Help:Getting started&amp;#039;, icon: &amp;#039;help&amp;#039;, label: &amp;#039;How to edit&amp;#039; },&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		{ title: &amp;#039;Help:Getting started&amp;#039;, icon: &amp;#039;help&amp;#039;, label: &amp;#039;How to edit&amp;#039; },&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		{ title: &amp;#039;Special:Upload&amp;#039;, icon: &amp;#039;upload&amp;#039;, label: &amp;#039;Upload a file&amp;#039; },&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		{ title: &amp;#039;Special:Upload&amp;#039;, icon: &amp;#039;upload&amp;#039;, label: &amp;#039;Upload a file&amp;#039; },&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki-mediawiki-:diff:1.41:old-60:rev-61:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.brucecooper.tv/index.php?title=MediaWiki:Common.js&amp;diff=60&amp;oldid=prev</id>
		<title>Admin: Pin main navigation into the Citizen header rail as icon buttons</title>
		<link rel="alternate" type="text/html" href="https://wiki.brucecooper.tv/index.php?title=MediaWiki:Common.js&amp;diff=60&amp;oldid=prev"/>
		<updated>2026-08-13T01:00:51Z</updated>

		<summary type="html">&lt;p&gt;Pin main navigation into the Citizen header rail as icon buttons&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
 * Pin the main navigation into Citizen&amp;#039;s header rail as icon buttons, so the&lt;br /&gt;
 * common destinations are one click away instead of hidden behind the hamburger.&lt;br /&gt;
 *&lt;br /&gt;
 * Citizen leaves &amp;lt;div class=&amp;quot;citizen-header__start&amp;quot;&amp;gt; empty and offers no config&lt;br /&gt;
 * or hook to populate it, so it is filled here. The hamburger drawer is left&lt;br /&gt;
 * completely alone and remains the full menu.&lt;br /&gt;
 *&lt;br /&gt;
 * URLs come from mw.util.getUrl() rather than being hardcoded, so this keeps&lt;br /&gt;
 * working if $wgArticlePath ever changes. The markup deliberately copies the&lt;br /&gt;
 * classes Citizen&amp;#039;s own rail buttons use (see Preferences.mustache), so the&lt;br /&gt;
 * buttons inherit the native look instead of needing bespoke CSS.&lt;br /&gt;
 *&lt;br /&gt;
 * Icons must exist in the skins.citizen.icons pack (60 of them); home, help,&lt;br /&gt;
 * upload, recentChanges and die all do.&lt;br /&gt;
 *&lt;br /&gt;
 * Failure mode: if a Citizen upgrade renames the slot, querySelector returns&lt;br /&gt;
 * null, this exits quietly and the hamburger still has every link.&lt;br /&gt;
 */&lt;br /&gt;
mw.loader.using( &amp;#039;mediawiki.util&amp;#039; ).then( function () {&lt;br /&gt;
	var slot = document.querySelector( &amp;#039;.citizen-header__start&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
	// Bail if the slot is missing (skin changed) or already filled (double-run).&lt;br /&gt;
	if ( !slot || slot.childElementCount &amp;gt; 0 ) {&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	var items = [&lt;br /&gt;
		{ title: &amp;#039;Main Page&amp;#039;, icon: &amp;#039;home&amp;#039;, label: &amp;#039;Main page&amp;#039; },&lt;br /&gt;
		{ title: &amp;#039;Help:Getting started&amp;#039;, icon: &amp;#039;help&amp;#039;, label: &amp;#039;How to edit&amp;#039; },&lt;br /&gt;
		{ title: &amp;#039;Special:Upload&amp;#039;, icon: &amp;#039;upload&amp;#039;, label: &amp;#039;Upload a file&amp;#039; },&lt;br /&gt;
		{ title: &amp;#039;Special:RecentChanges&amp;#039;, icon: &amp;#039;recentChanges&amp;#039;, label: &amp;#039;Recent changes&amp;#039; },&lt;br /&gt;
		{ title: &amp;#039;Special:Random&amp;#039;, icon: &amp;#039;die&amp;#039;, label: &amp;#039;Random page&amp;#039; }&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	items.forEach( function ( item ) {&lt;br /&gt;
		var link = document.createElement( &amp;#039;a&amp;#039; );&lt;br /&gt;
		link.href = mw.util.getUrl( item.title );&lt;br /&gt;
		link.title = item.label;&lt;br /&gt;
		link.className = &amp;#039;citizen-header__item citizen-cdx-button--size-large &amp;#039; +&lt;br /&gt;
			&amp;#039;cdx-button cdx-button--fake-button cdx-button--fake-button--enabled &amp;#039; +&lt;br /&gt;
			&amp;#039;cdx-button--weight-quiet cdx-button--icon-only&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		var icon = document.createElement( &amp;#039;span&amp;#039; );&lt;br /&gt;
		icon.className = &amp;#039;citizen-ui-icon mw-ui-icon-wikimedia-&amp;#039; + item.icon;&lt;br /&gt;
&lt;br /&gt;
		// cdx-button--icon-only hides this visually but keeps it for screen readers.&lt;br /&gt;
		var text = document.createElement( &amp;#039;span&amp;#039; );&lt;br /&gt;
		text.textContent = item.label;&lt;br /&gt;
&lt;br /&gt;
		link.appendChild( icon );&lt;br /&gt;
		link.appendChild( text );&lt;br /&gt;
		slot.appendChild( link );&lt;br /&gt;
	} );&lt;br /&gt;
} );&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>