<commit_before>/*global
    window, document
 */
(function (exports) {
    "use strict";

    var scriptUrl = document.scripts[document.scripts.length - 1].src,
        baseUrl = scriptUrl.substring(0, scriptUrl.lastIndexOf('/') + 1),
        nainwakletUrl = baseUrl + "nainwaklet.js";

    function getNainwakletInjectionUrl(channel) {
        var template = function () {
                var d = document,
                    b = d.body,
                    id = "nainwakletScript",
                    s = d.getElementById(id);
                if (s) {
                    b.removeChild(s);
                }
                s = d.createElement('script');
                s.setAttribute('type', 'text/javascript');
                s.setAttribute('src', '@src@');
                s.setAttribute('data-channel', '@channel@');
                s.setAttribute('id', id);
                b.appendChild(s);
            },
            code = template.toString()
                .replace(/\s+/g, ' ')
                .replace('@src@', nainwakletUrl)
                .replace('@channel@', channel);<commit_msg>HTTPS support for the nainwaklet button<commit_after>/*global
    window, document
 */
(function (exports) {
    "use strict";

    var scriptUrl = document.scripts[document.scripts.length - 1].src,
        baseUrl = scriptUrl.substring(0, scriptUrl.lastIndexOf('/') + 1),
        nainwakletUrl = baseUrl.replace(/^https?:/, '') + "nainwaklet.js";

    function getNainwakletInjectionUrl(channel) {
        var template = function () {
                var d = document,
                    b = d.body,
                    id = "nainwakletScript",
                    s = d.getElementById(id);
                if (s) {
                    b.removeChild(s);
                }
                s = d.createElement('script');
                s.setAttribute('type', 'text/javascript');
                s.setAttribute('src', '@src@');
                s.setAttribute('data-channel', '@channel@');
                s.setAttribute('id', id);
                b.appendChild(s);
            },
            code = template.toString()
                .replace(/\s+/g, ' ')
                .replace('@src@', nainwakletUrl)
                .replace('@channel@', channel);
{'fraction_non_alphanumeric': 0.14317375886524822, 'fraction_numerical': 0.0026595744680851063, 'mean_word_length': 1.5189732142857142, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1030030', 'n_tokens_mistral': 643, 'n_tokens_neox': 608, 'n_words': 110}