From 0fa3ba99c9bc65f549a48bdd42bdb747e2c6056d Mon Sep 17 00:00:00 2001 From: kagg-design Date: Tue, 24 Sep 2024 00:53:33 +0300 Subject: [PATCH] Do not use iframe in admin-nf.js. --- assets/js/admin-nf.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/js/admin-nf.js b/assets/js/admin-nf.js index a02e8361..e056b8ab 100644 --- a/assets/js/admin-nf.js +++ b/assets/js/admin-nf.js @@ -114,10 +114,9 @@ document.addEventListener( 'DOMContentLoaded', function() { const callback = ( mutationList ) => { for ( const mutation of mutationList ) { [ ...mutation.addedNodes ].map( ( node ) => { - if ( - document.querySelector( '.h-captcha' ) && - ! document.querySelector( '.h-captcha iframe' ) - ) { + const hCaptcha = document.querySelector( '.h-captcha' ); + + if ( hCaptcha && hCaptcha.innerHTML.trim() === '' ) { window.hCaptchaBindEvents(); }