<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://quarktek.dev/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ACitizen.js</id>
	<title>MediaWiki:Citizen.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://quarktek.dev/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ACitizen.js"/>
	<link rel="alternate" type="text/html" href="https://quarktek.dev/index.php?title=MediaWiki:Citizen.js&amp;action=history"/>
	<updated>2026-12-01T05:29:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://quarktek.dev/index.php?title=MediaWiki:Citizen.js&amp;diff=1118&amp;oldid=prev</id>
		<title>Werty: Created page with &quot;/* All JavaScript here will be loaded for users of the Citizen skin */  /* Location infobox image descriptions */  (function () {     &quot;use strict&quot;;      function InitializeLocationInfoboxes(Content) {         $(Content).find(&quot;.portable-infobox.pi-theme-fjtr-location&quot;).addBack(             &quot;.portable-infobox.pi-theme-fjtr-location&quot;         ).each(function () {             const Infobox = this;             const Gallery = Infobox.querySelector(&quot;.pi-media-collection&quot;);...&quot;</title>
		<link rel="alternate" type="text/html" href="https://quarktek.dev/index.php?title=MediaWiki:Citizen.js&amp;diff=1118&amp;oldid=prev"/>
		<updated>2026-11-15T03:56:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;span class=&quot;autocomment&quot;&gt;All JavaScript here will be loaded for users of the Citizen skin: &lt;/span&gt;  &lt;span class=&quot;autocomment&quot;&gt;Location infobox image descriptions: &lt;/span&gt;  (function () {     &amp;quot;use strict&amp;quot;;      function InitializeLocationInfoboxes(Content) {         $(Content).find(&amp;quot;.portable-infobox.pi-theme-fjtr-location&amp;quot;).addBack(             &amp;quot;.portable-infobox.pi-theme-fjtr-location&amp;quot;         ).each(function () {             const Infobox = this;             const Gallery = Infobox.querySelector(&amp;quot;.pi-media-collection&amp;quot;);...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/* All JavaScript here will be loaded for users of the Citizen skin */&lt;br /&gt;
&lt;br /&gt;
/* Location infobox image descriptions */&lt;br /&gt;
&lt;br /&gt;
(function () {&lt;br /&gt;
    &amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    function InitializeLocationInfoboxes(Content) {&lt;br /&gt;
        $(Content).find(&amp;quot;.portable-infobox.pi-theme-fjtr-location&amp;quot;).addBack(&lt;br /&gt;
            &amp;quot;.portable-infobox.pi-theme-fjtr-location&amp;quot;&lt;br /&gt;
        ).each(function () {&lt;br /&gt;
            const Infobox = this;&lt;br /&gt;
            const Gallery = Infobox.querySelector(&amp;quot;.pi-media-collection&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            if (!Gallery || Gallery.dataset.fjtrDescriptionsReady) {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            const Tabs = Array.from(&lt;br /&gt;
                Gallery.querySelectorAll(&amp;quot;ul.pi-media-collection-tabs li&amp;quot;)&lt;br /&gt;
            );&lt;br /&gt;
&lt;br /&gt;
            const Rows = Array.from(Infobox.querySelectorAll(&amp;quot;.pi-data&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
            const FindRow = function (Name) {&lt;br /&gt;
                return Rows.find(function (Row) {&lt;br /&gt;
                    const Label = Row.querySelector(&amp;quot;.pi-data-label&amp;quot;);&lt;br /&gt;
                    return Label &amp;amp;&amp;amp; Label.textContent.trim() === Name;&lt;br /&gt;
                });&lt;br /&gt;
            };&lt;br /&gt;
&lt;br /&gt;
            const DetailsRow = FindRow(&amp;quot;Details&amp;quot;);&lt;br /&gt;
            const FeaturesRow = FindRow(&amp;quot;Features&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            if (!DetailsRow || !Tabs.length) {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            const DetailsValue = DetailsRow.querySelector(&amp;quot;.pi-data-value&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            if (!DetailsValue) {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            const Descriptions = DetailsValue.textContent&lt;br /&gt;
                .trim()&lt;br /&gt;
                .split(&amp;quot;;;&amp;quot;)&lt;br /&gt;
                .map(function (Description) {&lt;br /&gt;
                    return Description.trim();&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
            if (!Descriptions.length || !Descriptions[0]) {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            const DetailsLabel = DetailsRow.querySelector(&amp;quot;.pi-data-label&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            if (DetailsLabel) {&lt;br /&gt;
                DetailsLabel.textContent = &amp;quot;Features&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            if (FeaturesRow) {&lt;br /&gt;
                FeaturesRow.style.display = &amp;quot;none&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            function UpdateDescription(Index) {&lt;br /&gt;
                DetailsValue.textContent =&lt;br /&gt;
                    Descriptions[Index] || Descriptions[0];&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            Tabs.forEach(function (Tab, Index) {&lt;br /&gt;
                Tab.addEventListener(&amp;quot;click&amp;quot;, function () {&lt;br /&gt;
                    UpdateDescription(Index);&lt;br /&gt;
                });&lt;br /&gt;
            });&lt;br /&gt;
&lt;br /&gt;
            const InitialIndex = Tabs.findIndex(function (Tab) {&lt;br /&gt;
                return Tab.classList.contains(&amp;quot;current&amp;quot;);&lt;br /&gt;
            });&lt;br /&gt;
&lt;br /&gt;
            UpdateDescription(InitialIndex &amp;gt;= 0 ? InitialIndex : 0);&lt;br /&gt;
&lt;br /&gt;
            Gallery.dataset.fjtrDescriptionsReady = &amp;quot;true&amp;quot;;&lt;br /&gt;
        });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    mw.hook(&amp;quot;wikipage.content&amp;quot;).add(InitializeLocationInfoboxes);&lt;br /&gt;
})();&lt;/div&gt;</summary>
		<author><name>Werty</name></author>
	</entry>
</feed>