Skip to content

Instantly share code, notes, and snippets.

@LeftistTachyon
Last active December 4, 2024 17:28
Show Gist options
  • Save LeftistTachyon/85962ddef931f8e8b2f86ab67b46cb34 to your computer and use it in GitHub Desktop.
Save LeftistTachyon/85962ddef931f8e8b2f86ab67b46cb34 to your computer and use it in GitHub Desktop.
The scripting half of the pfp insanity
savestring = "*insert Base64 junk here*";
saving=true;
document.getElementById('button_save').style.background='#888';
statusdiv.innerHTML='Saving the painting';
(SaveObj=new XMLHttpRequest()).open('POST', 'includes/ajax_dsipaint_save.php', true);
SaveObj.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
SaveObj.send ('data='+savestring);
SaveObj.onreadystatechange=function(){
if(SaveObj.readyState==4){
statusdiv.innerHTML=SaveObj.responseText;
saving=false;
document.getElementById('button_save').style.background='#00f';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment