MediaWiki:Sandbox.js

var resetButton = 'Reset Sandbox';

$('.reset-container').append(resetButton).click(function {    var token = mw.user.tokens.values.editToken;    var text = '';    var url = wgServer + '/api.php?action=edit&title=Project:Sandbox&text=' + encodeURIComponent(text) + '&token=' + encodeURIComponent(token);    $.post(url, function  { alert("Page Cleaned"); location.reload; }); });