File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -784,6 +784,23 @@ <h2>📌 CAA records for</h2>
784784 checkBtn . addEventListener ( 'click' , performLookup ) ;
785785 domainInput . addEventListener ( 'keypress' , ( e ) => { if ( e . key === 'Enter' ) performLookup ( ) ; } ) ;
786786
787+ // ===== NEW CODE: Handle URL parameter on page load =====
788+ function handleUrlParameter ( ) {
789+ const urlParams = new URLSearchParams ( window . location . search ) ;
790+ const domainParam = urlParams . get ( 'domain' ) ;
791+
792+ if ( domainParam ) {
793+ // Set the input field value
794+ domainInput . value = domainParam ;
795+ // Automatically trigger the CAA lookup
796+ performLookup ( ) ;
797+ }
798+ }
799+
800+ // Call the function when the page loads
801+ window . addEventListener ( 'load' , handleUrlParameter ) ;
802+ // ===== END OF NEW CODE =====
803+
787804 // initial placeholder
788805 renderGeneratedList ( ) ; // empty list
789806 } ) ( ) ;
You can’t perform that action at this time.
0 commit comments