<commit_before><html>
    <head>
        <!-- these 4 files always have to be included -->
        <link rel="stylesheet" type="text/css" href="../../lib/css/materialize.css">
        <link rel="stylesheet" type="text/css" href="../../css/adapter.css" />
        <script type="text/javascript" src="../../lib/js/jquery-3.2.1.min.js"></script>
        <script type="text/javascript" src="../../socket.io/socket.io.js"></script>
        <!-- these files always have to be included -->
        <script type="text/javascript" src="../../js/translate.js"></script>
        <script type="text/javascript" src="../../lib/js/materialize.js"></script>
        <script type="text/javascript" src="../../js/adapter-settings.js"></script>
        <script type="text/javascript" src="words.js"></script>
        <style>
            .m .col .select-wrapper + label {
                top: -26px;
            }

            .m span {
                font-size: 0.9em;
            }
        </style>
        <!-- you have to define 2 functions in the global scope: -->
        <script type="text/javascript">

            // the function loadSettings has to exist ...
            function load(settings, onChange) {
                // example: select elements with id=key and class=value and insert value
                if (!settings) return;
                $('.value').each(function () {
                    var $key = $(this);
                    var id = $key.attr('id');
                    if ($key.attr('type') === 'checkbox') {
                        // do not call onChange direct, because onChange could expect some arguments
                        $key.prop('checked', settings[id]).change(function () {
                            onChange();
                        });
                    } else {
                        // do not call onChange direct, because onChange could expect some arguments
                        $key.val(settings[id]).change(function () {
                            onChange();
                        }).keyup(function () {
                            onChange();
                        });
                    }
                });
                onChange(false);
                M.updateTextFields();  // function Materialize.updateTextFields(); to reinitialize all the Materialize labels on the page if you are dynamically adding inputs.
            }

            // ... and the function save has to exist.
            // you have to make sure the callback is called with the settings object as first param!
            function save(callback) {
                // example: select elements with class=value and build settings object
                var obj = {};
                $('.value').each(function () {
                    var $this = $(this);
                    if ($this.attr('type') === 'checkbox') {
                        obj[$this.attr('id')] = $this.prop('checked');
                    } else {
                        obj[$this.attr('id')] = $this.val();
                    }
                });
                callback(obj);
            }
        </script>
    </head>

    <body>
        <!-- you have to put your config page in a div with id adapter-container -->
        <div class="m adapter-container">
            <div class="row">
                <!-- Forms are the standard way to receive user inputted data.
                Learn more http://materializecss.com/forms.html-->
                <div class="row">
                        <img style="width: 220px; height: 60px;" alt="Syncthing-Logo" src="syncthing-horizontal.png" class="logo">
                </div>
                <div class="row">
                    <div class="input-field col s12 m6 l4">
                        <span class="translate">Syncthing URL:</span>
                        <input class="value" id="syncthingurl" size="40" type="text">
                        <span class="translate"><small>(e.g. http://127.0.0.1:8080)</small></span>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12 m6 l4">
                        <span class="translate">Syncthing API-Key:</span>
                        <input class="value" id="syncthingapikey" size="40" type="text">
                        <span class="translate"><small>(see Syncthing menu Actions/Advanced)</small></span>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12 m6 l4">
                        <span class="translate">Syncthing Folder-ID:</span>
                        <input class="value" id="syncthingfolderid" size="40" type="text">
                        <span class="translate"><small>(the ID of the Syncthing folder to be included)</small></span>
                    </div>
                </div><commit_msg>Updated to version 0.1.1<commit_after><html>
    <head>
        <!-- these 4 files always have to be included -->
        <link rel="stylesheet" type="text/css" href="../../lib/css/materialize.css">
        <link rel="stylesheet" type="text/css" href="../../css/adapter.css" />
        <script type="text/javascript" src="../../lib/js/jquery-3.2.1.min.js"></script>
        <script type="text/javascript" src="../../socket.io/socket.io.js"></script>
        <!-- these files always have to be included -->
        <script type="text/javascript" src="../../js/translate.js"></script>
        <script type="text/javascript" src="../../lib/js/materialize.js"></script>
        <script type="text/javascript" src="../../js/adapter-settings.js"></script>
        <script type="text/javascript" src="words.js"></script>
        <style>
            .m .col .select-wrapper + label {
                top: -26px;
            }

            .m span {
                font-size: 0.9em;
            }
        </style>
        <!-- you have to define 2 functions in the global scope: -->
        <script type="text/javascript">

            // the function loadSettings has to exist ...
            function load(settings, onChange) {
                // example: select elements with id=key and class=value and insert value
                if (!settings) return;
                $('.value').each(function () {
                    var $key = $(this);
                    var id = $key.attr('id');
                    if ($key.attr('type') === 'checkbox') {
                        // do not call onChange direct, because onChange could expect some arguments
                        $key.prop('checked', settings[id]).change(function () {
                            onChange();
                        });
                    } else {
                        // do not call onChange direct, because onChange could expect some arguments
                        $key.val(settings[id]).change(function () {
                            onChange();
                        }).keyup(function () {
                            onChange();
                        });
                    }
                });
                onChange(false);
                M.updateTextFields();  // function Materialize.updateTextFields(); to reinitialize all the Materialize labels on the page if you are dynamically adding inputs.
            }

            // ... and the function save has to exist.
            // you have to make sure the callback is called with the settings object as first param!
            function save(callback) {
                // example: select elements with class=value and build settings object
                var obj = {};
                $('.value').each(function () {
                    var $this = $(this);
                    if ($this.attr('type') === 'checkbox') {
                        obj[$this.attr('id')] = $this.prop('checked');
                    } else {
                        obj[$this.attr('id')] = $this.val();
                    }
                });
                callback(obj);
            }
        </script>
    </head>

    <body>
        <!-- you have to put your config page in a div with id adapter-container -->
        <div class="m adapter-container">
            <div class="row">
                <!-- Forms are the standard way to receive user inputted data.
                Learn more http://materializecss.com/forms.html-->
                <div class="row">
                    <div class="input-field col s12 m6 l4">
                        <img style="width: 220px; height: 60px;" alt="Syncthing-Logo" src="syncthing-horizontal.png" class="logo">
                    </div>
                <div class="row">
                    <div class="input-field col s12 m6 l4">
                        <span class="translate">Syncthing URL:</span>
                        <input class="value" id="syncthingurl" size="40" type="text">
                        <span class="translate"><small>(e.g. http://127.0.0.1:8080)</small></span>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12 m6 l4">
                        <span class="translate">Syncthing API-Key:</span>
                        <input class="value" id="syncthingapikey" size="40" type="text">
                        <span class="translate"><small>(see Syncthing menu Actions/Advanced)</small></span>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12 m6 l4">
                        <span class="translate">Syncthing Folder-ID:</span>
                        <input class="value" id="syncthingfolderid" size="40" type="text">
                        <span class="translate"><small>(the ID of the Syncthing folder to be included)</small></span>
                    </div>
                </div>
{'fraction_non_alphanumeric': 0.14104257697388478, 'fraction_numerical': 0.009247027741083224, 'mean_word_length': 1.3517323775388292, 'pattern_counts': {'":': 0, '<': 134, '<?xml version=': 0, '>': 134, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3172329', 'n_tokens_mistral': 2483, 'n_tokens_neox': 2321, 'n_words': 636}