User:Iamawesome/common.js

From Illogicopedia
Jump to: navigation, search
// 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;