diff --git a/4chan_x.user.js b/4chan_x.user.js
index abb4af952..4c5f0e2aa 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1259,12 +1259,12 @@
var box, file, files;
files = $('#files', QR.qr);
box = $.el('li', {
- innerHTML: "
X"
+ innerHTML: "
X"
});
file = $('input', box);
$.bind(file, 'change', QR.change);
$.bind($('img', box), 'click', function() {
- return this.nextSibling.click();
+ return $('input', this.parentNode).click();
});
$.bind($('.x', box), 'click', QR.rmThumb);
$.add(files, box);
@@ -1336,7 +1336,7 @@
}
qr = QR.qr;
fr = new FileReader();
- img = this.previousSibling;
+ img = $('img', this.parentNode);
fr.onload = function(e) {
return img.src = e.target.result;
};
@@ -3171,12 +3171,14 @@
https://bugs.webkit.org/show_bug.cgi?id=58208\
http://code.google.com/p/chromium/issues/detail?id=78961\
*/\
- visibility: hidden;\
+ font-size: 100px;\
+ position: absolute;\
+ left: 0;\
+ opacity: 0;\
}\
#qr #files img {\
max-height: 100px;\
max-width: 100px;\
- float: left;\
}\
#qr input[name=resto] {\
width: 80px;\
diff --git a/script.coffee b/script.coffee
index b548d5d85..f2b9988b1 100644
--- a/script.coffee
+++ b/script.coffee
@@ -973,10 +973,10 @@ QR =
#$('#autopost', QR.qr).checked = true
files = $ '#files', QR.qr
box = $.el 'li',
- innerHTML: "
X"
+ innerHTML: "
X"
file = $ 'input', box
$.bind file, 'change', QR.change
- $.bind $('img', box), 'click', -> @nextSibling.click()
+ $.bind $('img', box), 'click', -> $('input', @parentNode).click()
$.bind $('.x', box), 'click', QR.rmThumb
$.add files, box
file.click()
@@ -1028,7 +1028,7 @@ QR =
return
{qr} = QR
fr = new FileReader()
- img = @previousSibling
+ img = $ 'img', @parentNode
fr.onload = (e) ->
img.src = e.target.result
fr.readAsDataURL file
@@ -2501,12 +2501,14 @@ Main =
https://bugs.webkit.org/show_bug.cgi?id=58208
http://code.google.com/p/chromium/issues/detail?id=78961
*/
- visibility: hidden;
+ font-size: 100px;
+ position: absolute;
+ left: 0;
+ opacity: 0;
}
#qr #files img {
max-height: 100px;
max-width: 100px;
- float: left;
}
#qr input[name=resto] {
width: 80px;