diff --git a/4chan_x.user.js b/4chan_x.user.js
index c9afd650f..fad9cee6a 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1367,8 +1367,9 @@
this.el = $.el('a', {
className: 'preview',
href: 'javascript:;',
- innerHTML: "x"
+ innerHTML: 'x'
});
+ $('input', this.el).checked = this.spoiler;
$.on(this.el, 'click', function() {
return _this.select();
});
@@ -1663,10 +1664,11 @@
};
$.set('qr.persona', persona);
if (conf['Persistent QR'] || qr.replies.length > 1) {
- return reply.rm();
+ reply.rm();
} else {
- return qr.close();
+ qr.close();
}
+ return qr.resetFileInput();
},
message: {
init: function() {
diff --git a/script.coffee b/script.coffee
index 13ea074a1..fa76a1ea2 100644
--- a/script.coffee
+++ b/script.coffee
@@ -1005,12 +1005,13 @@ qr =
@el = $.el 'a',
className: 'preview'
href: 'javascript:;'
- innerHTML: "x"
+ innerHTML: 'x'
+ $('input', @el).checked = @spoiler
$.on @el, 'click', => @select()
$.on $('.remove', @el), 'click', (e) =>
e.stopPropagation()
@rm()
- $.on $('label', @el), 'click', (e) -> e.stopPropagation()
+ $.on $('label', @el), 'click', (e) => e.stopPropagation()
$.on $('input', @el), 'change', (e) =>
@spoiler = e.target.checked
$.id('spoiler').checked = @spoiler if @el.id is 'selected'
@@ -1252,6 +1253,7 @@ qr =
reply.rm()
else
qr.close()
+ qr.resetFileInput()
message:
init: ->