From d92ba8edc3bf43c9f5b6562e12e97915a2a49f3b Mon Sep 17 00:00:00 2001 From: manandeep singh Date: Thu, 28 Nov 2024 15:59:39 +0530 Subject: [PATCH] Fix captcha issues --- js/qsm-quiz.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js index 2a55aeed..af458deb 100644 --- a/js/qsm-quiz.js +++ b/js/qsm-quiz.js @@ -1876,12 +1876,14 @@ jQuery(document).ready(function () { mlw_code += mlw_chars.substring(rnum, rnum + 1); } var mlw_captchaCTX = document.getElementById('mlw_captcha').getContext('2d'); - mlw_captchaCTX.font = 'normal 24px Verdana'; - mlw_captchaCTX.strokeStyle = '#000000'; - mlw_captchaCTX.clearRect(0, 0, 100, 50); - mlw_captchaCTX.strokeText(mlw_code, 10, 30, 70); - mlw_captchaCTX.textBaseline = 'middle'; - document.getElementById('mlw_code_captcha').value = mlw_code; + mlw_captchaCTX.direction = 'rtl'; + mlw_captchaCTX.font = 'normal 24px Verdana'; + mlw_captchaCTX.strokeStyle = '#000000'; + mlw_captchaCTX.clearRect(0, 0, 100, 50); + mlw_captchaCTX.textAlign = 'right'; + mlw_captchaCTX.textBaseline = 'middle'; + mlw_captchaCTX.strokeText(mlw_code, 90, 25); + document.getElementById('mlw_code_captcha').value = mlw_code; } });