<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.joshuajamesslone.name/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AMobile.js</id>
	<title>MediaWiki:Mobile.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.joshuajamesslone.name/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AMobile.js"/>
	<link rel="alternate" type="text/html" href="http://wiki.joshuajamesslone.name/index.php?title=MediaWiki:Mobile.js&amp;action=history"/>
	<updated>2026-10-23T16:32:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>http://wiki.joshuajamesslone.name/index.php?title=MediaWiki:Mobile.js&amp;diff=10640&amp;oldid=prev</id>
		<title>JoshuaJSlone: Copying from https://en.wikipedia.org/wiki/User:Alexis_Jazz/MakeMobileCollapsible.js</title>
		<link rel="alternate" type="text/html" href="http://wiki.joshuajamesslone.name/index.php?title=MediaWiki:Mobile.js&amp;diff=10640&amp;oldid=prev"/>
		<updated>2026-02-17T18:47:24Z</updated>

		<summary type="html">&lt;p&gt;Copying from https://en.wikipedia.org/wiki/User:Alexis_Jazz/MakeMobileCollapsible.js&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 mobile site */&lt;br /&gt;
&lt;br /&gt;
// MakeMobileCollapsible, enables collapsible templates/infoboxes on the mobile site.&lt;br /&gt;
// See https://en.wikipedia.org/wiki/Wikipedia:MakeMobileCollapsible for more information.&lt;br /&gt;
// This is a spinoff from Factotum. (https://en.wikipedia.org/wiki/User:Alexis_Jazz/Factotum)&lt;br /&gt;
// MakeMobileCollapsible is public domain, irrevocably released as WTFPL Version 2[www.wtfpl.net/about/] by its author, Alexis Jazz.&lt;br /&gt;
/*globals $:false,mw:false*/&lt;br /&gt;
//&amp;lt;nowiki&amp;gt;&lt;br /&gt;
var MMCollap = {};&lt;br /&gt;
MMCollap.do = function(classes,int) {&lt;br /&gt;
&lt;br /&gt;
	/* Outcommented for now, to be revisited later as some people raised potential concerns with providing mobile-only features:&lt;br /&gt;
	Allow content to be collapsible only on the mobile site which could be useful as mobile displays are smaller, so the threshold to wish to make something collapsible could be greater&lt;br /&gt;
	to achieve this, change &amp;quot;mw-&amp;quot; to &amp;quot;MMC-&amp;quot; in all classes used. Do NOT use custom toggles as they won&amp;#039;t be hidden on the desktop site.&lt;br /&gt;
	classes = [&amp;#039;collapsible&amp;#039;,&amp;#039;collapsed&amp;#039;,&amp;#039;collapsible-toggle&amp;#039;,&amp;#039;collapsible-content&amp;#039;,&amp;#039;collapsible-toggle-placeholder&amp;#039;,&amp;#039;collapsible-toggle-expanded&amp;#039;];&lt;br /&gt;
	if ( $(&amp;#039;.MMC-collapsible,.MMC-collapsed&amp;#039;)[0] ) {&lt;br /&gt;
		for(int=0;int&amp;lt;classes.length;int++){&lt;br /&gt;
			$(&amp;#039;.MMC-&amp;#039;+classes[int]).addClass(&amp;#039;mw-&amp;#039;+classes[int]);&lt;br /&gt;
		}&lt;br /&gt;
	}*/&lt;br /&gt;
	MMCollap.els = $(&amp;#039;.mw-collapsible&amp;#039;);&lt;br /&gt;
	if ( MMCollap.els[0] ) {&lt;br /&gt;
		if ( MMCollap.els.length &amp;gt; 1  &amp;amp;&amp;amp; ( [&amp;#039;enwiki&amp;#039;].indexOf(mw.config.get(&amp;#039;wgDBname&amp;#039;)) != -1) ) {&lt;br /&gt;
			$(&amp;#039;.autocollapse&amp;#039;).addClass(&amp;#039;mw-collapsed&amp;#039;); //the &amp;quot;autocollapse&amp;quot; class is handled by code in Common.js on enwiki, but Common.js isn&amp;#039;t loaded on mobile.&lt;br /&gt;
		}&lt;br /&gt;
		mw.loader.using([&amp;#039;jquery.makeCollapsible&amp;#039;]).then( function () {&lt;br /&gt;
			mw.loader.addStyleTag(&amp;#039;.mw-parser-output .mw-collapsible-toggle{font-weight:normal;min-width:6em}&amp;#039;);&lt;br /&gt;
			$(MMCollap.els).makeCollapsible(); //T111565 FTFY&lt;br /&gt;
		});&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
mw.hook( &amp;#039;wikipage.content&amp;#039; ).add( MMCollap.do ); //make collapsible content collapsible whenever the page is rendered, on load but also e.g. after saving an edit&lt;br /&gt;
//&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>JoshuaJSlone</name></author>
	</entry>
</feed>