User:Ale jrb/Scripts/import.js

function alejrbImport(page,remote,id){var c=new Date;var cachebypass='&killcache='+c.getDate +c.getSeconds+c.getMilliseconds;if((remote==null)||(remote==false)){var url=wgScript+'?action=raw&ctype=text/javascript'+cachebypass+'&title='+encodeURIComponent(page.replace(/ /g,'_'));}else{var url=page;}if(document.getElementById(id)!=null){document.getElementById(id).parentNode.removeChild(document.getElementById(id));}var script=document.createElement('script');script.setAttribute('src',url);script.setAttribute('type','text/javascript');if(id!=null)script.setAttribute('id',id);document.getElementsByTagName('head')[0].appendChild(script);return script;}