User:Iamawesome/common.js

From Illogicopedia
Jump to navigation Jump to search

Note: After saving, 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)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
// move special pages link to navigation
var a = document.getElementById('t-specialpages');
a.parentNode.removeChild(a);
var ul = document.getElementById('n-Main-Page').parentNode;
ul.appendChild(a);

// The top bar list
var ul = document.getElementById('pt-logout').parentNode;
var li1 = document.getElementById('pt-preferences');

// create some elements
var li = document.createElement('li');
a = document.createElement('a');
var txt = document.createTextNode('Userspace');

// link to all pages in userspace
a.appendChild(txt);
li.appendChild(a);
a.href="/w/index.php?title=Special%3APrefixIndex&prefix=User%3AIamawesome%2F&hideredirects=1&stripprefix=1";
a.title="Pages in your userspace";
li.id="pt-userspace";
ul.insertBefore(li, li1);

// Link to edit your page
a = document.createElement('a');
li = document.createElement('li');
li1 = document.getElementById('pt-mytalk');
txt = document.createTextNode("(Edit)");
a.appendChild(txt);
a.href="/w/index.php?title=User%3AIamawesome&action=edit";
a.title="Edit your user page";
li.appendChild(a);
li.id='pt-editmypage';
ul.insertBefore(li, li1);

// BECAUSE NOONE FOLS ME!!!
var disableUsernameReplace = true;