MediaWiki:Mobile.js: Difference between revisions
Content deleted Content added
Johnrdorazio (talk | contribs) No edit summary Tags: Mobile edit Mobile web edit |
Johnrdorazio (talk | contribs) No edit summary Tags: Mobile edit Mobile web edit |
||
Line 10:
let MMCollap = {};
MMCollap.do = function(classes,int) {
console.log('MMCollap.do was called');
/* Outcommented for now, to be revisited later as some people raised potential concerns with providing mobile-only features:
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
Line 22:
MMCollap.els = $('.mw-collapsible');
if ( MMCollap.els[0] ) {
console.log('collapsible elements were found');
if ( MMCollap.els.length > 1 && ( ['enwiki'].indexOf(mw.config.get('wgDBname')) != -1) ) {
$('.autocollapse').addClass('mw-collapsed'); //the "autocollapse" class is handled by code in Common.js on enwiki, but Common.js isn't loaded on mobile.
|