User:LOL/sandbox.js

function lolsandbox { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest; } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }   xmlhttp.onreadystatechange = function { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById('wpTextbox1').value = xmlhttp.responseText; }   }    var url = prompt('Enter the URL of a page whose source shall be fetched', 'URL'); xmlhttp.open('GET', url, true); xmlhttp.send; }

$(function {   if (document.forms.editform) {        mw.util.addPortletLink('p-tb', 'javascript:lolsandbox', 'Sandbox', 't-mmarecordcolumns', 'LOL', , );    } });