MediaWiki talk:Mobile.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Broken JavaScript[edit]

MediaWiki developers found that this page probably breaks JavaScript for users (example: not seeing the buttons when editing a page). You probably need to edit this .js page and/or MediaWiki:Gadgets-definition as in the examples at phabricator:T122755. List more pages to check.

If you have questions or need help, please ask at phabricator:T164242. You can login with your wiki account. Best wishes, Nemo 09:49, 14 May 2017 (UTC)[reply]

ImageStack[edit]

{{Editprotected}} There is a template {{Imagestack}} that relies on javascript in MediaWiki:Common.js#L-553. Since Common.js is not loaded on mobile ($wgMFCustomSiteModules is true on commons), the template looks broken on the mobile site. Could the relavent lines also be copied here in order to make the template work? That would be:

/**
 * ImageStacks
 * Maintainer: [[User:Hellerhoff]], [[User:DieBuche]]
 */
// Only load if page contains template
mw.hook( 'wikipage.content' ).add( function ( $content ) {
    if ( $content.find( 'div.ImageStack' ).length ) mw.loader.load( 'ext.gadget.ImageStack' );
} );

(cc User:harej). Bawolff (talk) 16:47, 5 April 2024 (UTC)[reply]

✓ Done --Lucas Werkmeister (talk) 17:40, 5 April 2024 (UTC)[reply]