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

View File

@ -777,7 +777,11 @@
}; };
watched = JSON.parse(GM_getValue('watched', '{}')); watched = JSON.parse(GM_getValue('watched', '{}'));
if (location.hostname.split('.')[0] === 'sys') { 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); GM_setValue('error', b.firstChild.textContent);
} else { } else {
GM_setValue('error', ''); GM_setValue('error', '');