Skip to content

Instantly share code, notes, and snippets.

@LeftistTachyon
Last active August 17, 2023 21:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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