From 4012156128f2a122f94ef92caba0083dd8260845 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 21 Sep 2011 20:12:06 -0700 Subject: [PATCH] rearange img / input --- 4chan_x.user.js | 6 +++--- script.coffee | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 620aabdf1..6adbf3035 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: "click hereX" + innerHTML: "click hereX" }); file = $('input', box); $.bind(file, 'change', QR.change); $.bind($('img', box), 'click', function() { - return this.previousSibling.click(); + return this.nextSibling.click(); }); $.bind($('.x', box), 'click', QR.rmThumb); $.add(files, box); @@ -1336,7 +1336,7 @@ } qr = QR.qr; fr = new FileReader(); - img = this.nextSibling; + img = this.previousSibling; fr.onload = function(e) { return img.src = e.target.result; }; diff --git a/script.coffee b/script.coffee index 15477a425..17ebdb6b5 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: "click hereX" + innerHTML: "click hereX" file = $ 'input', box $.bind file, 'change', QR.change - $.bind $('img', box), 'click', -> @previousSibling.click() + $.bind $('img', box), 'click', -> @nextSibling.click() $.bind $('.x', box), 'click', QR.rmThumb $.add files, box file.click() @@ -1028,7 +1028,7 @@ QR = return {qr} = QR fr = new FileReader() - img = @nextSibling + img = @previousSibling fr.onload = (e) -> img.src = e.target.result fr.readAsDataURL file