capture sage, fix autowatch
This commit is contained in:
parent
e175a399a5
commit
1fe459504e
@ -1012,8 +1012,9 @@
|
|||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var isQR, recaptcha, span;
|
var form, isQR, recaptcha, span;
|
||||||
isQR = e.target.parentNode.id === 'qr';
|
form = e.target;
|
||||||
|
isQR = form.parentNode.id === 'qr';
|
||||||
if (isQR) {
|
if (isQR) {
|
||||||
if (span = this.nextSibling) {
|
if (span = this.nextSibling) {
|
||||||
$.remove(span);
|
$.remove(span);
|
||||||
@ -1034,7 +1035,7 @@
|
|||||||
}
|
}
|
||||||
recaptcha = $('input[name=recaptcha_response_field]', this);
|
recaptcha = $('input[name=recaptcha_response_field]', this);
|
||||||
if (recaptcha.value) {
|
if (recaptcha.value) {
|
||||||
g.sage = $('#qr input[name=email]').value === 'sage';
|
g.sage = $('input[name=email]', form).value === 'sage';
|
||||||
if (isQR) {
|
if (isQR) {
|
||||||
return qr.autohide.set();
|
return qr.autohide.set();
|
||||||
}
|
}
|
||||||
@ -1156,7 +1157,7 @@
|
|||||||
_ref = html.match(/<!-- thread:(\d+),no:(\d+) -->/), _ = _ref[0], thread = _ref[1], id = _ref[2];
|
_ref = html.match(/<!-- thread:(\d+),no:(\d+) -->/), _ = _ref[0], thread = _ref[1], id = _ref[2];
|
||||||
if (thread === '0') {
|
if (thread === '0') {
|
||||||
_ref2 = $('meta', d).content.match(/4chan.org\/(\w+)\//), _ = _ref2[0], board = _ref2[1];
|
_ref2 = $('meta', d).content.match(/4chan.org\/(\w+)\//), _ = _ref2[0], board = _ref2[1];
|
||||||
return window.location = "http://boards.4chan.org/" + board + "/res/" + thread + "#watch";
|
return window.location = "http://boards.4chan.org/" + board + "/res/" + id + "#watch";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -761,7 +761,8 @@ qr =
|
|||||||
$.bind quote, 'click', qr.cb.quote
|
$.bind quote, 'click', qr.cb.quote
|
||||||
|
|
||||||
submit: (e) ->
|
submit: (e) ->
|
||||||
isQR = e.target.parentNode.id == 'qr'
|
form = e.target
|
||||||
|
isQR = form.parentNode.id == 'qr'
|
||||||
|
|
||||||
if isQR
|
if isQR
|
||||||
if span = @nextSibling
|
if span = @nextSibling
|
||||||
@ -782,7 +783,7 @@ qr =
|
|||||||
|
|
||||||
recaptcha = $('input[name=recaptcha_response_field]', this)
|
recaptcha = $('input[name=recaptcha_response_field]', this)
|
||||||
if recaptcha.value
|
if recaptcha.value
|
||||||
g.sage = $('#qr input[name=email]').value == 'sage'
|
g.sage = $('input[name=email]', form).value == 'sage'
|
||||||
if isQR
|
if isQR
|
||||||
qr.autohide.set()
|
qr.autohide.set()
|
||||||
else
|
else
|
||||||
@ -890,7 +891,7 @@ qr =
|
|||||||
[_, thread, id] = html.match(/<!-- thread:(\d+),no:(\d+) -->/)
|
[_, thread, id] = html.match(/<!-- thread:(\d+),no:(\d+) -->/)
|
||||||
if thread is '0'
|
if thread is '0'
|
||||||
[_, board] = $('meta', d).content.match(/4chan.org\/(\w+)\//)
|
[_, board] = $('meta', d).content.match(/4chan.org\/(\w+)\//)
|
||||||
window.location = "http://boards.4chan.org/#{board}/res/#{thread}#watch"
|
window.location = "http://boards.4chan.org/#{board}/res/#{id}#watch"
|
||||||
|
|
||||||
threadHiding =
|
threadHiding =
|
||||||
init: ->
|
init: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user