<!DOCTYPE HTML>
< html lang = "en" >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< title > picopublish< / title >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< link rel = "stylesheet" type = "text/css" href = "/static/application.css" >
< link rel = "stylesheet" type = "text/css" href = "{{ .CaptchaURL }}/static/captcha.css" >
< script src = "{{ .CaptchaURL }}/static/captcha.js?v=3" > < / script >
< / head >
< body >
< div class = "header" >
< h3 > PicoPublish< / h3 >
< div style = "float:right; padding-right:20px;" >
< a href = "https://git.sequentialread.com/forest/picopublish" > source code< / a >
< / div >
< / div >
< div class = "header-shadow" > < / div >
< div class = "splash content" >
< h3 > Please wait for a moment...< / h3 >
< form method = "POST" action = "" style = "font-size: 11px;" >
< input type = "hidden" name = "challenge" value = "{{ .Challenge }}" / >
< input type = "hidden" name = "nonce" / >
< div class = "captcha-container"
data-sqr-captcha-url="{{ .CaptchaURL }}"
data-sqr-captcha-challenge="{{ .Challenge }}"
data-sqr-captcha-callback="myCaptchaCallback">
< / div >
< / form >
< / div >
< script >
window.myCaptchaCallback = (nonce) => {
document.querySelector("form input[name='nonce']").value = nonce;
setTimeout(function() {
document.querySelector("form").submit();
}, 500);
};
// note its important that the CSS is already loaded at this point,
// otherwise the script will wait to create the captcha element
// until the css is loaded, and so code inside sqrCaptchaTrigger will fail
// because it will try to update the captcha element that doesn't exist yet.
window.sqrCaptchaInit();
window.sqrCaptchaTrigger();
< / script >
< / body >
< / html >