MediaWiki:Mobile.js: Difference between revisions

Created page with "All JavaScript here will be loaded for users of the mobile site: ( function () { if ( mw.config.get( 'skin' ) !== 'minerva' ) { return; } function addLinks() { var menu = document.querySelector( '.menu' ); if ( !menu ) { return; } var ul = document.createElement( 'ul' ); ul.className = 'mobile-custom-links'; var links = [ { title: 'Home', href: mw.util.getUrl( 'Main Page' ) }, { title: 'All Agents', href: mw.util.getUrl( 'Category:Agent'..."
 
No edit summary
Line 40: Line 40:
mw.hook( 'mobileFrontend.menuReady' ).add( addLinks );
mw.hook( 'mobileFrontend.menuReady' ).add( addLinks );
}() );
}() );
alert('Mobile.js loaded');