User:PrimeHunter/Mobile view.js
/* Add a "Mobile view" sidebar link to switch to the mobile version.
The bottom of desktop pages already have such a link but
it may be hard to activate for some.
Install with this in your Special:MyPage/common.js:
importScript('User:PrimeHunter/Mobile view.js'); // Linkback: User:PrimeHunter/Mobile view.js
- /
$( document ).ready( function() {
mw.util.addPortletLink(
'p-tb',
location.href.replace( location.hash, '' ) + ( location.search ? '&' : '?' )
+ 'mobileaction=toggle_view_mobile',
'Mobile view',
't-mobileview',
'Switch to the mobile version'
);
});