How to add Button to firstrunwizard that closes the wizard

Hi,

I am totally new to ownCloud, php and javascript.
My goal is to adapt the firstrunwizard to display a button. Only the click of the button closes the firstrunwizard.

So fare I was able to add a button. The functionality worked only after I disabled the csp (content security policy) of my browser.
Then I tried to write the code by the rules of the csp shown here:
https://developer.chrome.com/extensions/contentSecurityPolicy
But apparently I did something wrong.

This is what I have so fare:
apps/firstrunwizard/templates/wizard.php

    <div id="firstrunwizard">

    <h1>Some Text.</h1>
    <p>Some Text.</p>

    <a>
            <img src="/core/img/somelogo.svg">
    </a>
    <script> function myFunction()
    {
            alert("Hello World!");
    }
    window.onload = function () 
   {
            myAnchor = document.getElementById("accept_license_btn");
            myAnchor.onclick = function(e)
      {  
            myFunction(); // e.preventDefault();
      }
    }
    </script>
    <p> <button id="accept_license_btn">Some Text.</button> </p>

    <p class="footnote">
    Some Text.
    </p>

    </div>

I know that I am still working inline but when using the browser debugger the csp does not seem to care about that. Also I know that it only displayes a 'Hello World!'. At the moment I am doing a lot of try and error.

I would appreciate some help.

Thanks!