User:Wladekb/global.js

window.console && window.console.log('global.js');

(function(window,$) { var btn = $('Trace');  btn.click(function{ var script = document.createElement('script'); script.src = 'http://wladek.wikia-dev.com/traceviewer/traceviewer.js'; script.type = "text/javascript"; var link = document.createElement('link'); link.href = 'http://wladek.wikia-dev.com/traceviewer/traceviewer.css'; link.rel = 'stylesheet'; link.type = 'text/css'; $('head') .append(script) .append(link); }); $('body').append(btn); })(this,jQuery);