• Resolved shadycuz

    (@shadycuz)


    Hey,

    I’m using Zerif lite with the pirate plugin. When I enable the recaptcha it puts a <script tag in the header pointing to the google api. I would like the move this to the footer since My contact form is below the fold. I was looking through the template files and could not find where that code is. I’m guessing its in the theme files and its mostly php but I tried seaching for the beginning of the <scr tag and still couldn’t find it. Any help on locating it would be great. I would like to use this code to call that .js so I can defer it to load until after the page.

    <script type=”text/javascript”>
    function downloadJSAtOnload() {
    var element = document.createElement(“script”);
    element.src = “defer.js”;
    document.body.appendChild(element);
    }
    if (window.addEventListener)
    window.addEventListener(“load”, downloadJSAtOnload, false);
    else if (window.attachEvent)
    window.attachEvent(“onload”, downloadJSAtOnload);
    else window.onload = downloadJSAtOnload;
    </script>

Viewing 1 replies (of 1 total)
  • Hey there,

    Apologies for the late reply.

    It’s not possible to do this right not as it would require editing theme files which is NOT recommended. However, I will pass this to our developers and we will try to improve this in the next release. Thank you for your suggestion.

Viewing 1 replies (of 1 total)
  • The topic ‘Moving the google recaptcha/api.js to below the fold’ is closed to new replies.