nodebb-plugin-math-captcha
Version:
Adds a simple mathematical problem to the registration process.
13 lines • 428 B
JavaScript
$(function() {
$(window).on('action:ajaxify.end', function (evt, data) {
if(data.tpl_url === 'register') {
socket.emit('plugins.mathCaptcha.getProblem', function (err, results) {
if(!err) {
$('[for=' + results.uuid + '] span').text(results.problem);
} else {
console.log(err);
}
});
}
});
});