From cb19633812bb47156211563d9a2994d8c4afdac4 Mon Sep 17 00:00:00 2001
From: phillimorland <5871230+phillimorland@users.noreply.github.com>
Date: Wed, 25 May 2022 10:39:05 +0200
Subject: [PATCH] capcheck.js: fix typo and update focus behaviour
---
euth/captcha/assets/captcheck.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/euth/captcha/assets/captcheck.js b/euth/captcha/assets/captcheck.js
index 3304be883..bb9c63a95 100644
--- a/euth/captcha/assets/captcheck.js
+++ b/euth/captcha/assets/captcheck.js
@@ -122,7 +122,7 @@ window.onload = function () {
const questionDiv = document.createElement('div')
questionDiv.setAttribute('class', 'captcheck_label_message')
questionDiv.setAttribute('id', 'captcheck_' + idp + '_label_message')
- questionDiv.innerHTML = "" + data.question_i + "" + data.question_a + "" + textTextMode + ''
+ questionDiv.innerHTML = "" + data.question_i + "" + data.question_a + "" + textTextMode + ''
/* Add question and answers */
captcha.appendChild(questionDiv)
@@ -171,6 +171,6 @@ window.onload = function () {
styles.setAttribute('nonce', nonce)
}
/* Remove newlines/comments from captcheck.css and put it here */
- styles.innerHTML = '.captcheck_box{font-family:Ubuntu,Arial,sans-serif;color:black;border:1px solid #e0e0e0;border-radius:3px;display:inline-block;padding:3px;margin:5px 2px 5px 1px;background-color:#f5f5f5;text-decoration:none}.captcheck_label_message,.captcheck_label_message b{color:black;font-family:Ubuntu,Roboto,Arial,sans-serif}.captcheck_answer_label{border:0}.captcheck_answer_label>input{visibility:hidden;position:absolute}.captcheck_answer_label>input+img{cursor:pointer;border:2px solid transparent;border-radius:3px;min-width:32px;width:18%;max-width:64px}.captcheck_answer_label>input:checked+img{cursor:pointer;border:2px solid #424242;border-radius:3px}.captcheck_error_message{color:red}.captcheck_question_image{display:initial}.captcheck_question_access{display:none}.captcheck_alt_question_button{float:right;font-size:80%;cursor:pointer;color:inherit;text-decoration:inherit;border:0}.captcheck_alt_question_button:focus{outline:0!important}.captcheck_answer_images>a:focus{outline:0!important}.captcheck_answer_images{display:initial}.captcheck_answer_access{display:none}'
+ styles.innerHTML = '.captcheck_box{font-family:Ubuntu,Arial,sans-serif;color:black;border:1px solid #e0e0e0;border-radius:3px;display:inline-block;padding:3px;margin:5px 2px 5px 1px;background-color:#f5f5f5;text-decoration:none}.captcheck_label_message,.captcheck_label_message b{color:black;font-family:Ubuntu,Roboto,Arial,sans-serif}.captcheck_answer_label{border:0}.captcheck_answer_label>input{visibility:hidden;position:absolute}.captcheck_answer_label>input+img{cursor:pointer;border:2px solid transparent;border-radius:3px;min-width:32px;width:18%;max-width:64px}.captcheck_answer_label>input:checked+img{cursor:pointer;border:2px solid #424242;border-radius:3px}.captcheck_error_message{color:red}.captcheck_question_image{display:initial}.captcheck_question_access{display:none}.captcheck_alt_question_button{float:right;font-size:80%;cursor:pointer;color:inherit;text-decoration:inherit;border:0}.captcheck_alt_question_button:focus{outline:0}.captcheck_alt_question_button:focus-visible{outline:auto}.captcheck_answer_images>a:focus{outline:0}.captcheck_answer_images>a:focus-visible{outline:auto}.captcheck_answer_images{display:initial}.captcheck_answer_access{display:none}'
document.body.appendChild(styles)
}