User:DarkMatterMan4500/PersonalDashboardLink.js
From WikiOasis Meta
More actions
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/*
Adds a link to the dashboard of your choice to the top bar.
Installation: Add the following line of code to your common.js:
importScript( 'User:Mdaniels5757/PersonalDashboardLink.js' ); // Backlink: [[:commons:User:Mdaniels5757/PersonalDashboardLink.js]]
Note: By default, the link is to 'User:YourUserName/Dashboard',
but you can change it by adding the following line to your common.js,
before where you add the script in your common.js:
var dashboardPath = 'Namespace:Title/MaybeASubpage/OrTwo' // I'm special.
*/
// This just loads the script from Commons.
mw.loader.load('//commons.wikimedia.org/w/index.php?title=User:Mdaniels5757/PersonalDashboardLink.js&action=raw&ctype=text/javascript');
//[[Category:Wikipedia scripts]]