From 5a6f8cedc5292cd41f7ac1c8145b692d804d1564 Mon Sep 17 00:00:00 2001 From: James Campos Date: Thu, 17 Mar 2011 22:26:43 -0700 Subject: [PATCH] reset file input --- 4chan_x.js | 4 +++- script.coffee | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/4chan_x.js b/4chan_x.js index 3e99c13ce..e2c1919a6 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -522,7 +522,7 @@ } }; iframeLoad = function() { - var auto, error, qr, span, submit, _ref, _ref2; + var auto, error, f, qr, span, submit, _ref, _ref2; if (g.iframe = !g.iframe) { return; } @@ -540,6 +540,8 @@ } else if (g.REPLY && getConfig('Persistent QR')) { $('textarea', qr).value = ''; $('input[name=recaptcha_response_field]', qr).value = ''; + f = $('input[type=file]', qr).parentNode; + f.innerHTML = f.innerHTML; submit = $('input[type=submit]', qr); submit.value = g.sage ? 60 : 30; submit.disabled = true; diff --git a/script.coffee b/script.coffee index 06cd6a76f..38e7b5701 100644 --- a/script.coffee +++ b/script.coffee @@ -364,6 +364,9 @@ iframeLoad = -> else if g.REPLY and getConfig 'Persistent QR' $('textarea', qr).value = '' $('input[name=recaptcha_response_field]', qr).value = '' + # XXX file.value = '' doesn't work in opera + f = $('input[type=file]', qr).parentNode + f.innerHTML = f.innerHTML submit = $ 'input[type=submit]', qr submit.value = if g.sage then 60 else 30 submit.disabled = true