User:Hippietrail/monobook.js

// See also MediaWiki:Monobook.js, Customizing your monobook

// add css and javascript links to personal toolbar function addTools { var myprefs = document.getElementById('pt-preferences'); var newpt; var newa;

newpt = document.createElement('li'); newa = document.createElement('a'); newa.href='/w/index.php?title=User:' + wgUserName + '/monobook.css&action=edit'; newa.appendChild(document.createTextNode('css')); newpt.appendChild(newa); myprefs.parentNode.insertBefore(newpt, myprefs);

newpt = document.createElement('li'); newa = document.createElement('a'); newa.href='/w/index.php?title=User:' + wgUserName + '/monobook.js&action=edit'; newa.appendChild(document.createTextNode('js')); newpt.appendChild(newa); myprefs.parentNode.insertBefore(newpt, myprefs);

newpt = document.createElement('li'); newa = document.createElement('a'); newa.href='/wiki/User:Connel MacKenzie/Preferences'; newa.appendChild(document.createTextNode('more preferences')); newpt.appendChild(newa); myprefs.parentNode.insertBefore(newpt, myprefs.nextSibling); }

importScript('User:Hippietrail/citetab.js'); // Dunno why but Google Chrome doesn't always like personalsidebar.js if (navigator.userAgent.toLowerCase.indexOf('chrome') == -1) importScript('User:Hippietrail/personalsidebar.js'); //importScript('JSLib:personalsidebar.js'); //importScript('User:Hippietrail/wiktionaryprefs.js'); if (navigator.userAgent.toLowerCase.indexOf('chrome') == -1) importScript('User:Hippietrail/ajaxtranslinks.js'); //importScript('User:Hippietrail/addstructure.js'); importScript('User:Hippietrail/localisenavbars.js'); importScript('User:Hippietrail/filtercontribs.js');

//importScript('User:Hippietrail/nearbypages-alpha.js');

//document.write('<\/script>');

//document.write('<\/script>');

function customiseMyPage { var ua = navigator.userAgent.toLowerCase; // Dunno why but Google Chrome doesn't always like personalsidebar.js if (!/(chrome|msie)/.test(ua)) personalizeSidebar; addTools; // wiktionaryPrefs; if (!/(chrome|msie)/.test(ua)) ajaxtranslinks; // addstructure; if (!/(msie)/.test(ua)) localisenavbars; }

$(customiseMyPage);