Fix QR on expanded threads.

This commit is contained in:
Nicolas Stepien 2011-05-18 16:48:32 +02:00
parent f48f7fc6de
commit 50b57d049a
2 changed files with 3 additions and 3 deletions

View File

@ -1141,7 +1141,7 @@
dialog: function(link) {
var MAX_FILE_SIZE, THREAD_ID, challenge, dialog, html, mail, name, pass, spoiler, src;
MAX_FILE_SIZE = $('input[name="MAX_FILE_SIZE"]').value;
THREAD_ID = g.THREAD_ID || link.pathname.split('/').pop();
THREAD_ID = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', link).id;
challenge = $('input[name=recaptcha_challenge_field]').value;
src = "http://www.google.com/recaptcha/api/image?c=" + challenge;
name = $('input[name=name]').value;

View File

@ -897,8 +897,8 @@ qr =
dialog: (link) ->
#maybe should be global
MAX_FILE_SIZE = $('input[name="MAX_FILE_SIZE"]').value
#FIXME inlined quotes
THREAD_ID = g.THREAD_ID or link.pathname.split('/').pop()
#FIXME inlined cross-thread quotes
THREAD_ID = g.THREAD_ID or $.x('ancestor::div[@class="thread"]/div', link).id
challenge = $('input[name=recaptcha_challenge_field]').value
src = "http://www.google.com/recaptcha/api/image?c=#{challenge}"
name = $('input[name=name]').value