<commit_before><!doctype html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0">
        <title>Quink Example - cursor navigation from the host page</title>
        <script type="text/javascript" src="../../quink.js"></script>
        <style>
        .page-button {
            min-height: 40px;
            min-width: 100px;
        }
        </style>
    </head>
    <body>
        <div contenteditable="true" id="ed-1">
This is editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more. This is editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more. This is editable... some text in here to fill up the page.
        </div>
        <div contenteditable="true" id="ed-2">
            A second editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more. This is editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more.
        </div>
        <button class="page-button" id="btn-toggle">Toggle and select</button>
        <button class="page-button" id="btn-nav">Nav</button>
        <button class="page-button" id="btn-blur">Blur</button>
        <button class="page-button" id="btn-focus">Focus</button>
        <script type="text/javascript">
            QUINK.ready = function (PubSub) {
                var btnToggle = document.querySelector('#btn-toggle'),
                    btnNav = document.querySelector('#btn-nav');
                btnToggle.addEventListener('click', function () {
                    PubSub.publish('command.exec', 'nav.select.toggle');
                });
                btnNav.addEventListener('click', function () {
                    var ed = document.querySelector('#ed-1');
                    ed.focus();
                    PubSub.publish('command.exec', 'nav.word.next');
                });

                document.querySelector('#btn-blur').addEventListener('click', function () {
                    console.log('host doc... blurring');
                    document.querySelector('#btn-blur').blur();
                });
                document.querySelector('#btn-focus').addEventListener('click', function () {
                    console.log('host doc... focusing');
                    document.querySelector('#btn-focus').focus();
                });
            };
        </script>
    <body>
</html><commit_msg>Fix example.<commit_after><!doctype html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0">
        <title>Quink Example - cursor navigation from the host page</title>
        <script type="text/javascript" src="../../quink.js"></script>
        <style>
        .page-button {
            min-height: 40px;
            min-width: 100px;
        }
        </style>
    </head>
    <body>
        <div contenteditable="true" id="ed-1">
This is editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more. This is editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more. This is editable... some text in here to fill up the page.
        </div>
        <div contenteditable="true" id="ed-2">
            A second editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more. This is editable... some text in here to fill up the page. Some more text and more and more and so on. Now just copy and paste to make it look like even more.
        </div>
        <button class="page-button" id="btn-toggle">Toggle and select</button>
        <button class="page-button" id="btn-nav">Nav</button>
        <button class="page-button" id="btn-blur">Blur</button>
        <button class="page-button" id="btn-focus">Focus</button>
        <script type="text/javascript">
            QUINK.ready = function (PubSub) {
                var btnToggle = document.querySelector('#btn-toggle'),
                    btnNav = document.querySelector('#btn-nav');
                btnToggle.addEventListener('click', function () {
                    PubSub.publish('command.exec', 'nav.select.toggle');
                });
                btnNav.addEventListener('click', function () {
                    var ed = document.querySelector('#ed-1');
                    ed.focus();
                    PubSub.publish('command.exec', 'nav.word.next');
                });

                document.querySelector('#btn-blur').addEventListener('click', function () {
                    console.log('host doc... blurring');
                    document.querySelector('#ed-1').blur();
                });
                document.querySelector('#btn-focus').addEventListener('click', function () {
                    console.log('host doc... focusing');
                    document.querySelector('#ed-1').focus();
                });
            };
        </script>
    <body>
</html>
{'fraction_non_alphanumeric': 0.13098282791377422, 'fraction_numerical': 0.005480453050785532, 'mean_word_length': 2.019856591285163, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, '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': '4516147', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1400, 'n_words': 476}