Jump to content

User:PrimeHunter/Short navigation.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 shortens the displayed names of the personal navigation links at top
   of pages. To use the script, add the following line to [[Special:MyPage/common.js]]:
 
importScript('User:PrimeHunter/Short navigation.js'); // Linkback: [[User:PrimeHunter/Short navigation.js]]

*/
 
$( function () {
  document.getElementById('pt-userpage').getElementsByTagName('a')[0].firstChild.nodeValue = 'User';
  document.getElementById('pt-preferences').getElementsByTagName('a')[0].firstChild.nodeValue = 'Prefs';
  document.getElementById('pt-sandbox').getElementsByTagName('a')[0].firstChild.nodeValue = 'Sand';
  document.getElementById('pt-watchlist').getElementsByTagName('a')[0].firstChild.nodeValue = 'Watch';
  document.getElementById('pt-mycontris').getElementsByTagName('a')[0].firstChild.nodeValue = 'Contribs';
  document.getElementById('pt-logout').getElementsByTagName('a')[0].firstChild.nodeValue = 'Out';
});