<commit_before><!DOCTYPE html>
<html>
    <head>
        <title>Pay with TommyPay</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
    </head>
    <body>
        <h2>Pay with TommyPay!</h2>
        <p><i>A very primitive payment app that shows the entire payment request passed
            to it as JSON.</i></p>

        <pre id="paymentView"></pre>

        <button id="paymentButton">Pay</button>

        <script>
            var paymentView = document.getElementById("paymentView");
            var paymentButton = document.getElementById("paymentButton");

            navigator.serviceWorker.addEventListener('message', function(event) {
                console.log("Page got message from SW");
                paymentView.textContent = JSON.stringify(event.data, null, '  ');
                paymentButton.onclick = function() {
                    console.log("Page passing response back to SW");
                    event.source.postMessage({
                        methodName: "https://tommypay.no/pay",
                        details: {
                            test: "test"
                        }
                    });
                    window.close();
                }
            });
        </script>
    </body>
</html>
<commit_msg>Make the payment screen prettier<commit_after><!DOCTYPE html>
<html>
    <head>
        <title>Sign up for TommyPay</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="stylesheet" href="../files/style.css"/>
    </head>
    <body>
        <div class="content" style="background-image: url(../files/cashbox.png)">
            <h2 class="title">Pay with TommyPay</h2>
            <div class="separator"></div>

            <p>Do you wish to make this payment?</p>

            <a class="button" id="paymentbutton" href="#">Pay!</a>
        </div>

        <div class="footer">
            <p>&copy; 2017 TommyPay</p>
        </div>

        <script>
            var paymentView = document.getElementById("paymentView");
            var paymentButton = document.getElementById("paymentButton");

            navigator.serviceWorker.addEventListener('message', function(event) {
                console.log("Page got message from SW");
                paymentView.textContent = JSON.stringify(event.data, null, '  ');
                paymentButton.onclick = function() {
                    console.log("Page passing response back to SW");
                    event.source.postMessage({
                        methodName: "https://tommypay.no/pay",
                        details: {
                            test: "test"
                        }
                    });
                    window.close();
                }
            });
        </script>
    </body>
</html>

{'fraction_non_alphanumeric': 0.13126323218066338, 'fraction_numerical': 0.0035285815102328866, 'mean_word_length': 1.5914076782449726, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 52, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5378651', 'n_tokens_mistral': 744, 'n_tokens_neox': 696, 'n_words': 155}