User:Jesdisciple/monaco.js

$(document).ready(function {       var body = document.getElementsByTagName('body')[0];        var notice = document.createElement('div');        notice.style.position = 'absolute';        notice.style.height = '2.8em';        notice.style.padding = 0;            var title = document.createElement('div');            title.style.height = '1.4em';            title.style.backgroundColor = '#f00';            title.style.fontWeight = 'bold';            title.style.textAlign = 'center';            title.appendChild(document.createTextNode('Wrong Account!'));                var exit = document.createElement('a');                exit.appendChild(document.createTextNode('X'));                exit.style.border = '1px solid black';                exit.style.color = '#000';                exit.style.cursor = 'pointer';                exit.title = 'Close';                title.appendChild(exit);                $(exit).wrap(document.createElement('span')) .parent.css('margin-top', '1px') .css('float', 'right'); notice.appendChild(title); var content = document.createElement('div'); content.style.height = '1.4em'; content.style.backgroundColor = '#f66'; content.appendChild(document.createTextNode('You forgot to log into Buctum instead. '));               var link = document.createElement('a'); link.appendChild(document.createTextNode('Do it now.')); link.href = 'http://runescape.wikia.com/index.php?title=Special:UserLogout&returnto=Special:Signup'; $(link).click(function {                       var iframe = document.createElement('iframe');                        iframe.src = link.href;                        $(iframe).load(function { iframe.documentElement.getElementById('wpName2Ajax').value = 'Buctum'; });                       $(content).empty.append                        scroll;                        return false;                    }); content.appendChild(link); notice.appendChild(content); function scroll{ $(notice).offset({               top: $(window).scrollTop + ($(window).height - $(notice).height) / 2,                left: $(window).scrollLeft + ($(window).width - $(notice).width) / 2}); }       $(window).scroll(scroll); scroll; body.appendChild(notice); });