From 640f80bb56e06b9911ac48082c9f44c22edb22be Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Sun, 20 Feb 2022 01:01:40 +1100 Subject: [PATCH] for noscript users, in pow only mode (not when hcaptcha enabled), the page now includes a small encoded script that will get the correct captcha value. Slower than javascript, but good enough. --- README.MD | 1 + src/scripts/hcaptcha.lua | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 5b7bf3b..30ae3e3 100644 --- a/README.MD +++ b/README.MD @@ -17,6 +17,7 @@ Improvements in this fork: - Global toggle, for pow mode only. - Choose whitelist, pow or pow+captcha per-domain or per-domain+path, with paths taking priority. - Include dataplaneapi, to sync map files to disk if edited during runtime. +- In POW only mode, provide instructions and an encoded script to find the solution. - Many bugfixes. #### How to test diff --git a/src/scripts/hcaptcha.lua b/src/scripts/hcaptcha.lua index 1cd63b9..85c1794 100644 --- a/src/scripts/hcaptcha.lua +++ b/src/scripts/hcaptcha.lua @@ -60,6 +60,9 @@ local body_template = [[ a,a:visited{color:var(--text-color)} body,html{height:100%%} body{display:flex;flex-direction:column;background-color:var(--bg-color);color:var(--text-color);font-family:Helvetica,Arial,sans-serif;text-align:center;margin:0} + details{max-width:80vw;text-align:left;margin:0 auto;} + summary{text-align:center;} + code{background-color:#dfdfdf30;border-radius:3px;padding:0 3px;} h3,p{margin:3px} footer{font-size:small;margin-top:auto;margin-bottom:50px}h3{padding-top:30vh} @@ -73,6 +76,7 @@ local body_template = [[ %s