Discourse Sign Up redirect to URL instead of modal

I’ve been currently trying to change the landing page of the sign up for user sign ups on my discourse install.

I’m trying to via their admin panel in customization in Edit Html/css specifically in the </head> section, i’ve also tried putting this in the </body>

For some reason this code is not stopping the default action, or redirecting the user on click

<script>
    var thingy = document.getElementsByClassName("sign-up-button")
    thingy.onclick ="return false;"
    thingy.onclick = function() {
        window.location.href = "https://join.domain.com";
    };
</script>

When I try and do this

<script>
    var thingy = document.getElementsByClassName("sign-up-button");
    console.log(thingy.length);
    console.log(thingy)
    for (var i = 0; i < thingy.length; i++) {
            console.log('print this');
    };
</script>

It shows the length of thingy as 0, but then it procedes to print a html element, but never iterates since the length is 0