This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copied by https://gist.github.com/dotcypress/8fd12d6e886cd74bba8f1aa8dbd346aa, | |
// thanks for improving code style | |
const { createHash, createHmac } = require('crypto'); | |
const TOKEN = "ABC:12345..."; | |
// I prefer get the secret's hash once but check the gist linked | |
// on line 1 if you prefer passing the bot token as a param | |
const secret = createHash('sha256') | |
.update(TOKEN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>reCAPTCHA without form / AJAX only</h2> | |
<div class="panel panel-warning" id="panel-recaptcha"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">Captcha</h3> | |
</div> | |
<div class="panel-body"> | |
<div id="recaptcha-service" class="g-recaptcha" | |
data-callback="recaptchaCallback" | |
data-sitekey=""></div> |