User:Jesdisciple/wikia.js

$(document).ready(function {               var exit = $(document.createElement('a'))            .css({border: '1px solid black', color: '#000', cursor: 'pointer'})           .append(document.createTextNode('X'))            .attr('title', 'Close')            .wrap($(document.createElement('span')) .css({marginTop: '1px',                     float: 'right'}))            .click(function { $(notice).remove; });       var content = $(document.createElement('div'))            .css({height: '1.4em', backgroundColor: '#f66'})           .append(document.createTextNode('You forgot to log into Buctum instead. '))            .append($(document.createElement('a')) .append(document.createTextNode('Do it now.')) .attr({href: 'http://runescape.wikia.com/index.php?title=Special:UserLogout',                      target: '_blank'}));        var notice = $(document.createElement('div'))            .css({position: 'absolute', padding: 0, zIndex: 100})           .append($(document.createElement('div')) .css({height: '1.4em',                     backgroundColor: '#f00',                      fontWeight: 'bold',                      textAlign: 'center'}) .append(document.createTextNode('Wrong Account!')) .append(exit))           .append(content);        function scroll{            $(notice).offset({ top: $(window).scrollTop + ($(window).height - $(notice).height) / 2, left: $(window).scrollLeft + ($(window).width - $(notice).width) / 2});       }        $(window).scroll(scroll);        $('body').append(notice);        scroll;    });