Difference between revisions of "MediaWiki:Mobile.js"

From Larnitech wiki page
Jump to navigation Jump to search
Line 18: Line 18:
 
   mw.log.warn('addPortletLink is deprecated on desktop and never implemented on mobile', 'More information on https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users)#addPortletLink');
 
   mw.log.warn('addPortletLink is deprecated on desktop and never implemented on mobile', 'More information on https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users)#addPortletLink');
 
}
 
}
mw.util.addPortletLink ('p-navigation', '/wiki/how_to_Do', 'How To Do1');
+
 
mw.util.addPortletLink ('p-interaction', '/wiki/how_to_Do', 'How To Do2');
+
mw.util.addPortletLink(
mw.util.addPortletLink ('p-tb', '/wiki/how_to_Do', 'How To Do3');
+
'p-personal',
mw.util.addPortletLink ('p-coll-print_export', '/wiki/how_to_Do', 'How To Do4');
+
'/wiki/Special:PrefixIndex/User:username',
mw.util.addPortletLink ('p-lang', '/wiki/how_to_Do', 'How To Do5');
+
'subpages',
mw.util.addPortletLink ('p-wikibase-otherprojects', '/wiki/how_to_Do', 'How To Do6');
+
'pt-subpages',
mw.util.addPortletLink ('p-personal', '/wiki/how_to_Do', 'How To Do7');
+
'Your subpages',
mw.util.addPortletLink ('p-views', '/wiki/how_to_Do', 'How To Do8');
+
null,
mw.util.addPortletLink ('p-cactions', '/wiki/how_to_Do', 'How To Do9');
+
'#pt-preferences'
 +
);

Revision as of 09:28, 20 July 2021

/* All JavaScript here will be loaded for users of the mobile site */
/* Note, there is no corresponding User:Username/mobile.js; however users may use User:Username/minerva.js */
// This script should be removed when all usages of `importScript` have been removed on English Wikipedia.
// importScript is deprecated on desktop, and removed on mobile.
// This was added on 25th January 2021. We can remove it at the end of February, and review whether the offending scripts have been fixed.
function  importScript(name) {
/* - Disabled pending additional discussion
  var $notification = $('<span>').html('An attempt to load a <a>user script</a> has failed. Please see JavaScript console for more information.');
  $notification.find('a').attr('href', '/w/index.php?title=' + name );
  mw.notify($notification);
*/
  mw.log.warn('importScript is deprecated on desktop and never implemented on mobile', 'More information on https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users)#importScript');
}
function  importStylesheet(name) {
  mw.log.warn('importStylesheet is deprecated on desktop and never implemented on mobile', 'More information on https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users)#importStylesheet');
}
function  addPortletLink() {
  mw.log.warn('addPortletLink is deprecated on desktop and never implemented on mobile', 'More information on https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users)#addPortletLink');
}

mw.util.addPortletLink(
 'p-personal',
 '/wiki/Special:PrefixIndex/User:username',
 'subpages',
 'pt-subpages',
 'Your subpages',
 null,
 '#pt-preferences'
 );