commit ead452777eeb9c4e09e2e8305974a20f139ab604
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-09-01T16:10:53Z |
| subject | Remove Contact if recaptcha does not exist |
commit ead452777eeb9c4e09e2e8305974a20f139ab604
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-09-01T16:10:53Z
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 )