diff --git a/4chan_x.user.js b/4chan_x.user.js
index ce9573e90..08bc41aa8 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1241,7 +1241,7 @@
challengeNode: function(e) {
var c;
c = e.target.value;
- $('img', qr.el).src = "http://www.google.com/recaptcha/api/image?c=" + c;
+ $('img', QR.el).src = "http://www.google.com/recaptcha/api/image?c=" + c;
return QR.captcha = {
challenge: c,
time: Date.now()
@@ -1261,14 +1261,14 @@
if (text == null) {
text = '';
}
- qr.el = ui.dialog('qr', {
+ QR.el = ui.dialog('qr', {
top: '0',
left: '0'
}, " X
Quick Reply
");
- $.bind($('form', qr.el), 'submit', QR.submit);
- $.bind($('#recaptcha_response_field', qr.el), 'keydown', QR.keydown);
- $.append(d.body, qr.el);
- ta = $('textarea', qr.el);
+ $.bind($('form', QR.el), 'submit', QR.submit);
+ $.bind($('#recaptcha_response_field', QR.el), 'keydown', QR.keydown);
+ $.append(d.body, QR.el);
+ ta = $('textarea', QR.el);
l = text.length;
ta.setSelectionRange(l, l);
return ta.focus();
@@ -1278,7 +1278,7 @@
if (!(e.keyCode === 13 && this.value)) {
return;
}
- if ($('textarea', qr.el).value || $('[type=file]', qr.el).files.length) {
+ if ($('textarea', QR.el).value || $('[type=file]', QR.el).files.length) {
return;
}
e.preventDefault();
@@ -1292,8 +1292,8 @@
return this.nextSibling.textContent = captchas.length + ' captchas';
},
submit: function(e) {
- $('#challenge', qr.el).value = QR.captcha.challenge;
- return $('#response', qr.el).value = $('#recaptcha_response_field', qr.el).value;
+ $('#challenge', QR.el).value = QR.captcha.challenge;
+ return $('#response', QR.el).value = $('#recaptcha_response_field', QR.el).value;
},
sys: function() {
return $.globalEval(function() {
@@ -1313,10 +1313,10 @@
var data;
data = e.data;
if (data) {
- return $.extend($('a.error', qr.el), JSON.parse(data));
+ return $.extend($('a.error', QR.el), JSON.parse(data));
} else {
- $.rm(qr.el);
- return qr.el = null;
+ $.rm(QR.el);
+ return QR.el = null;
}
}
};
diff --git a/script.coffee b/script.coffee
index e3647adf5..bfc97d2ef 100644
--- a/script.coffee
+++ b/script.coffee
@@ -975,7 +975,7 @@ QR =
QR.challengeNode target: holder.firstChild
challengeNode: (e) ->
c = e.target.value
- $('img', qr.el).src = "http://www.google.com/recaptcha/api/image?c=#{c}"
+ $('img', QR.el).src = "http://www.google.com/recaptcha/api/image?c=#{c}"
QR.captcha =
challenge: c
time: Date.now()
@@ -986,7 +986,7 @@ QR =
e.preventDefault()
QR.dialog ">>#{@textContent}\n"
dialog: (text='') ->
- qr.el = ui.dialog 'qr', top: '0', left: '0', "
+ QR.el = ui.dialog 'qr', top: '0', left: '0', "
X
Quick Reply
"
- $.bind $('form', qr.el), 'submit', QR.submit
- $.bind $('#recaptcha_response_field', qr.el), 'keydown', QR.keydown
- $.append d.body, qr.el
- ta = $ 'textarea', qr.el
+ $.bind $('form', QR.el), 'submit', QR.submit
+ $.bind $('#recaptcha_response_field', QR.el), 'keydown', QR.keydown
+ $.append d.body, QR.el
+ ta = $ 'textarea', QR.el
l = text.length
ta.setSelectionRange l, l
ta.focus()
keydown: (e) ->
return unless e.keyCode is 13 and @value #enter, captcha filled
- return if $('textarea', qr.el).value or $('[type=file]', qr.el).files.length #not blank
+ return if $('textarea', QR.el).value or $('[type=file]', QR.el).files.length #not blank
e.preventDefault()
{captcha} = QR
captcha.response = @value
@@ -1024,8 +1024,8 @@ QR =
Recaptcha.reload()
@nextSibling.textContent = captchas.length + ' captchas'
submit: (e) ->
- $('#challenge', qr.el).value = QR.captcha.challenge
- $('#response', qr.el).value = $('#recaptcha_response_field', qr.el).value
+ $('#challenge', QR.el).value = QR.captcha.challenge
+ $('#response', QR.el).value = $('#recaptcha_response_field', QR.el).value
sys: ->
$.globalEval ->
if node = document.querySelector('table font b')?.firstChild
@@ -1036,10 +1036,10 @@ QR =
receive: (e) ->
{data} = e
if data
- $.extend $('a.error', qr.el), JSON.parse data
+ $.extend $('a.error', QR.el), JSON.parse data
else
- $.rm qr.el
- qr.el = null
+ $.rm QR.el
+ QR.el = null
qr =
# TODO