Jump to content

User:Aydee/monobook.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.
// [[User:Lupin/popups.js]] - please include this line 

mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

simplePopups=true;

/* Functions borrowed from http://meta.wikimedia.org/wiki/User:Lupo/monobook.js
   Nothing in this is really original. */
function topLinks() {
  var contents = document.getElementById('column-content');
  var links     = document.getElementById('p-cactions');

  links.parentNode.removeChild (links);
  contents.insertBefore(links, contents.firstChild);
}

function topPersonals() {
  var contents = document.getElementById('column-content');
  var personal = document.getElementById('p-personal');

  personal.parentNode.removeChild (personal);
  contents.insertBefore(personal, contents.firstChild);
}

function reformatMyPage() {
  topLinks();
  topPersonals();
}

if (window.addEventListener) window.addEventListener("load",reformatMyPage,false);
else if (window.attachEvent) window.attachEvent("onload",reformatMyPage);