since I just did this a sec ago, some bonus for archive-digging anons and weirdos with different line numbers or different extensions,
context in the file is:
const CaptchaT = {
...
....some code here....
...
...sorry I dont feel like using vim to properly indent the rest of this....
getOne() {
let el;
let response = {};
if (this.nodes.container) {
for (var key of ['t-response', 't-challenge']) {
response[key] = $(`[name='${key}']`, this.nodes.container).value;
}
}
if (!response['t-response'] && !((el = $('#t-msg, #t-task')) && /Verification not required/i.test(el.textContent))) {
response = null;
}
return response;
},
}