add backspace recaptcha refreshing to reports

This commit is contained in:
James Campos 2010-11-10 02:03:24 -08:00
parent 04d56c0b3f
commit 986cf60ec6
2 changed files with 13 additions and 8 deletions

View File

@ -604,13 +604,15 @@ watchX = ->
favicon = input.previousSibling
favicon.src = favEmpty
#let's get this party started.
#main
watched = JSON.parse(GM_getValue('watched', '{}'))
if location.hostname.split('.')[0] is 'sys'
if b = $('table font b')
GM_setValue('error', b.firstChild.textContent)
if recaptcha = $ '#recaptcha_response_field'
m recaptcha, listener: ['keydown', recaptchaListener]
else if b = $ 'table font b'
GM_setValue 'error', b.firstChild.textContent
else
GM_setValue('error', '')
GM_setValue 'error', ''
if getConfig 'Auto Watch'
html = $('b').innerHTML
[_, thread, id] = html.match(/<!-- thread:(\d+),no:(\d+) -->/)
@ -619,9 +621,9 @@ if location.hostname.split('.')[0] is 'sys'
watched[board] or= []
watched[board].push {
id: id,
text: GM_getValue('autoText')
text: GM_getValue 'autoText'
}
GM_setValue('watched', JSON.stringify(watched))
GM_setValue 'watched', JSON.stringify watched
return
pathname = location.pathname.substring(1).split('/')
@ -724,7 +726,6 @@ GM_addStyle('
}
')
#main part 2...
AEOS.init()
if navtopr = $ '#navtopr a'
text = navtopr.nextSibling #css doesn't see text nodes

View File

@ -777,7 +777,11 @@
};
watched = JSON.parse(GM_getValue('watched', '{}'));
if (location.hostname.split('.')[0] === 'sys') {
if (b = $('table font b')) {
if (recaptcha = $('#recaptcha_response_field')) {
m(recaptcha, {
listener: ['keydown', recaptchaListener]
});
} else if (b = $('table font b')) {
GM_setValue('error', b.firstChild.textContent);
} else {
GM_setValue('error', '');