diff --git a/4chan_x.user.js b/4chan_x.user.js
index 13a565cf8..7b5c8ad30 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1221,7 +1221,7 @@
};
QR = {
init: function() {
- var accept, holder;
+ var holder;
g.callbacks.push(function(root) {
var quote;
quote = $('a.quotejs + a', root);
@@ -1238,7 +1238,7 @@
QR.captchaNode({
target: holder.firstChild
});
- accept = $('.rules').textContent.match(/: (.+) /)[1].replace(/\w+/g, function(type) {
+ QR.accept = $('.rules').textContent.match(/: (.+) /)[1].replace(/\w+/g, function(type) {
switch (type) {
case 'JPG':
return 'image/JPEG';
@@ -1248,7 +1248,6 @@
return 'image/' + type;
}
});
- QR.file = "
X";
QR.MAX_FILE_SIZE = $('input[name=MAX_FILE_SIZE]').value;
QR.spoiler = $('.postarea label') ? ' ' : '';
if (conf['Persistent QR']) {
@@ -1263,7 +1262,7 @@
var div, file, files;
files = $('#files', QR.qr);
div = $.el('div', {
- innerHTML: QR.file
+ innerHTML: "
X"
});
file = $('input', div);
$.bind(file, 'change', QR.change);
diff --git a/script.coffee b/script.coffee
index b4a845c9c..8404e036e 100644
--- a/script.coffee
+++ b/script.coffee
@@ -972,7 +972,7 @@ QR =
holder = $ '#recaptcha_challenge_field_holder'
$.bind holder, 'DOMNodeInserted', QR.captchaNode
QR.captchaNode target: holder.firstChild
- accept = $('.rules').textContent.match(/: (.+) /)[1].replace /\w+/g, (type) ->
+ QR.accept = $('.rules').textContent.match(/: (.+) /)[1].replace /\w+/g, (type) ->
switch type
when 'JPG'
'image/JPEG'
@@ -980,7 +980,6 @@ QR =
'application/' + type
else
'image/' + type
- QR.file = "
X"
QR.MAX_FILE_SIZE = $('input[name=MAX_FILE_SIZE]').value
QR.spoiler = if $('.postarea label') then ' ' else ''
if conf['Persistent QR']
@@ -991,7 +990,7 @@ QR =
foo: ->
files = $ '#files', QR.qr
div = $.el 'div',
- innerHTML: QR.file
+ innerHTML: "
X"
file = $ 'input', div
$.bind file, 'change', QR.change
$.bind $('img', div), 'click', -> @previousSibling.click()