MediaWiki:Gadget-MakeMobileCollapsible.js: Difference between revisions
Content deleted Content added
Johnrdorazio (talk | contribs) Created page with "// MakeMobileCollapsible, enables collapsible templates/infoboxes on the mobile site. // See https://en.wikipedia.org/wiki/Wikipedia:MakeMobileCollapsible for more information. // This is a spinoff from Factotum. (https://en.wikipedia.org/wiki/User:Alexis_Jazz/Factotum) // MakeMobileCollapsible is public domain, irrevocably released as WTFPL Version 2[www.wtfpl.net/about/] by its author, Alexis Jazz. →globals $:false,mw:false: //<nowiki> let MMCollap = {}; MMCollap.do..." |
Johnrdorazio (talk | contribs) No edit summary |
||
Line 1:
// MakeMobileCollapsible, enables collapsible templates/infoboxes on the mobile site.
// See https://en.wikipedia.org/wiki/Wikipedia:MakeMobileCollapsible for more information.
// This is a spinoff from Factotum. (https://en.wikipedia.org/wiki/User:Alexis_Jazz/Factotum)
// MakeMobileCollapsible, enables collapsible templates/infoboxes on the mobile site.
// This is a spinoff from Factotum. (https://en.wikipedia.org/wiki/User:Alexis_Jazz/Factotum)
// MakeMobileCollapsible is public domain, irrevocably released as WTFPL Version 2[www.wtfpl.net/about/] by its author, Alexis Jazz.
/*globals $:false,mw:false*/
let MMCollap = {};
MMCollap.do = function() {
MMCollap.els = $('.mw-collapsible');
if ( MMCollap.els[0] ) {
if ( MMCollap.els.length > 1
$('.autocollapse').addClass('mw-collapsed');
}
mw.loader.using(['jquery.makeCollapsible']).then( function () {
Line 28 ⟶ 21:
}
};
mw.hook( 'wikipage.content' ).add( MMCollap.do );
|