diff --git a/4chan_x.user.js b/4chan_x.user.js
index bf2e3b889..4941abc38 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1251,15 +1251,17 @@
}
},
attach: function() {
- var div;
+ var div, file;
div = $.el('div', {
innerHTML: 'X'
});
- $.bind($('input', div), 'change', QR.change);
+ file = $('input', div);
+ $.bind(file, 'change', QR.change);
$.bind($('a', div), 'click', function() {
return $.rm(this.parentNode);
});
- return $.append($('#files', QR.el), div);
+ $.append($('#files', QR.el), div);
+ return file.click();
},
autoPost: function() {
if (!QR.hasContent()) {
diff --git a/script.coffee b/script.coffee
index b147b296d..140e730d3 100644
--- a/script.coffee
+++ b/script.coffee
@@ -982,9 +982,11 @@ QR =
attach: ->
div = $.el 'div',
innerHTML: 'X'
- $.bind $('input', div), 'change', QR.change
+ file = $ 'input', div
+ $.bind file, 'change', QR.change
$.bind $('a', div), 'click', -> $.rm @parentNode
$.append $('#files', QR.el), div
+ file.click()
autoPost: ->
return unless QR.hasContent()
QR.submit()