MediaWiki:Mobile.js: Difference between revisions

From Linguifex
Jump to navigation Jump to search
Created page with "Any JavaScript here will be loaded for users using the mobile site Any JavaScript here is loaded instead of MediaWiki:Common.js for users using the mobile site: // See: https://en.wikipedia.org/wiki/Help:Collapsing // Restore collapsible elements by loading the jQuery module for them. $( function (mw, $) { 'use strict'; mw.loader.using('jquery.makeCollapsible', function ( ) { $( '.mw-collapsible' ).makeCollapsible ( ); } ); } (mediaWiki, jQuery) );"
 
No edit summary
Tags: Mobile edit Mobile web edit
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for users using the mobile site
/*if (mw.config.get('skin') === 'minerva') {
Any JavaScript here is loaded instead of MediaWiki:Common.js for users using the mobile site */
    var elements = document.querySelectorAll('.inflection-table-collapsed');
 
    Array.prototype.forEach.call(elements, function(el) {
// See: https://en.wikipedia.org/wiki/Help:Collapsing
        el.classList.remove('inflection-table-collapsed');
// Restore collapsible elements by loading the jQuery module for them.  
    });
 
}*/
$( function (mw, $) {
'use strict';
 
mw.loader.using('jquery.makeCollapsible', function ( ) {
$( '.mw-collapsible' ).makeCollapsible ( );
} );
} (mediaWiki, jQuery) );

Latest revision as of 19:47, 2 November 2025

/*if (mw.config.get('skin') === 'minerva') {
    var elements = document.querySelectorAll('.inflection-table-collapsed');
    Array.prototype.forEach.call(elements, function(el) {
        el.classList.remove('inflection-table-collapsed');
    });
}*/