User:BoatsAreRockable/global.js

importScriptPage('PurgeButton/code.js', 'dev'); //create div document.body.onload = addElement;

// creates a div element, class and html content var new_div = document.createElement('div'); new_div.className = 'charlietools'; new_div.innerHTML = 'The html text content'; new_div.style.width = "100px"; new_div.style.height = "100px"; new_div.style.background = "red"; new_div.style.color = "white"; // gets the reference tag var existingelement = document.getElementById('WikiaPageHeader'); // add 'add_div' before 'existingelement', inside body document.body.insertBefore(new_div, existingelement;