Jump to content

User:PrimeHunter/My logs.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* This script adds a link saying "Logs" to Special:Log/username for your username.
   The link is placed before "Contributions" on all pages.
   To use the script, add the following line to [[Special:MyPage/common.js]]:
 
importScript('User:PrimeHunter/My_logs.js'); // Linkback: [[User:PrimeHunter/My logs.js]]

*/

$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).done( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.getUrl( 'Special:Log/' ) + mw.config.get( 'wgUserName' ),
    'Logs',
    'pt-mylogs',
    'Show your log entries',
    null,
    '#pt-mycontris'
  );
});