diff --git a/contrib/js/backlink.js b/contrib/js/backlink.js index 4cbc2e9..c285c2d 100644 --- a/contrib/js/backlink.js +++ b/contrib/js/backlink.js @@ -183,6 +183,8 @@ DynReply.prototype.clearPostbox = function() { e.value = ""; e = document.getElementById("postform_message"); e.value = ""; + e = document.getElementById("postform_attachments"); + e.value = ""; } DynReply.prototype.post = function(cb, err_cb) { diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 0f24fb9..515983b 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -25,7 +25,7 @@ DynReply.prototype.show=function(){console.log("show dynreply");this.update();th DynReply.prototype.hide=function(){console.log("hide dynreply");this.elem.style.display="none";} DynReply.prototype.clear=function(){this.clearSolution();this.clearPostbox();} DynReply.prototype.clearSolution=function(){var e=document.getElementById("captcha_solution");e.value="";} -DynReply.prototype.clearPostbox=function(){var e=document.getElementById("postform_subject");e.value="";e=document.getElementById("postform_message");e.value="";} +DynReply.prototype.clearPostbox=function(){var e=document.getElementById("postform_subject");e.value="";e=document.getElementById("postform_message");e.value="";e=document.getElementById("postform_attachments");e.value="";} DynReply.prototype.post=function(cb,err_cb){if(this.url&&this.form){var data=new FormData(this.form);var ajax=new XMLHttpRequest();ajax.onreadystatechange=function(ev){if(ajax.readyState==XMLHttpRequest.DONE){var j=null;try{j=JSON.parse(ajax.responseText);cb(j);}catch(e){if(err_cb){err_cb(e);}}}} ajax.open("POST",this.url);ajax.send(data);}} DynReply.prototype.updateCaptcha=function(){if(this.prefix){var captcha_img=document.getElementById("captcha_img");captcha_img.src=this.prefix+"captcha/img";}