From ead452777eeb9c4e09e2e8305974a20f139ab604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Fri, 2 Sep 2022 00:10:53 +0800 Subject: [PATCH] Remove Contact if recaptcha does not exist --- botanjs/src/Astro/Blog/Layout/MainFrame.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/botanjs/src/Astro/Blog/Layout/MainFrame.js b/botanjs/src/Astro/Blog/Layout/MainFrame.js index e689c17..9d94d53 100644 --- a/botanjs/src/Astro/Blog/Layout/MainFrame.js +++ b/botanjs/src/Astro/Blog/Layout/MainFrame.js @@ -104,7 +104,15 @@ = "purple"; contact = Dand.id( "menu_cont", true ); - contact.addEventListener( "Click", loadContactForm ); + + if( window[ "recaptcha" ] ) + { + contact.addEventListener( "Click", loadContactForm ); + } + else + { + contact.element.remove(); + } Dand.id( "menu", true ).foreach( 1, function( e )