<commit_before>define(function () {
    var module = {};

    module.create = function (cfg, onLocal, Cryptpad) {
        var exp = {};

        var parsed = exp.parsedHref = Cryptpad.parsePadUrl(window.location.href);
        exp.defaultTitle = Cryptpad.getDefaultName(parsed);

        exp.title = document.title; // TOOD slides

        cfg = cfg || {};

        var getHeadingText = cfg.getHeadingText || function () { return; };
        var updateLocalTitle = function (newTitle) {
            exp.title = newTitle;
            if (typeof cfg.updateLocalTitle === "function") {
                cfg.updateLocalTitle(newTitle);
            } else {
                document.title = newTitle;
            }
        };

        var $title;
        exp.setToolbar = function (toolbar) {
            $title = toolbar && toolbar.title;
        };

        exp.getTitle = function () { return exp.title; };
        var isDefaultTitle = exp.isDefaultTitle = function (){return exp.title === exp.defaultTitle;};

        var suggestTitle = exp.suggestTitle = function (fallback) {
            if (isDefaultTitle()) {
                return getHeadingText() || fallback || "";
            } else {
                return exp.title || getHeadingText() || exp.defaultTitle;
            }
        };

        var renameCb = function (err, newTitle) {
            if (err) { return; }
            updateLocalTitle(newTitle);
            console.log('here');
            onLocal();
        };

        exp.updateTitle = function (newTitle) {
            if (newTitle === exp.title) { return; }
            // Change the title now, and set it back to the old value if there is an error
            var oldTitle = exp.title;
            Cryptpad.renamePad(newTitle, function (err, data) {<commit_msg>Remove unused console.log<commit_after>define(function () {
    var module = {};

    module.create = function (cfg, onLocal, Cryptpad) {
        var exp = {};

        var parsed = exp.parsedHref = Cryptpad.parsePadUrl(window.location.href);
        exp.defaultTitle = Cryptpad.getDefaultName(parsed);

        exp.title = document.title; // TOOD slides

        cfg = cfg || {};

        var getHeadingText = cfg.getHeadingText || function () { return; };
        var updateLocalTitle = function (newTitle) {
            exp.title = newTitle;
            if (typeof cfg.updateLocalTitle === "function") {
                cfg.updateLocalTitle(newTitle);
            } else {
                document.title = newTitle;
            }
        };

        var $title;
        exp.setToolbar = function (toolbar) {
            $title = toolbar && toolbar.title;
        };

        exp.getTitle = function () { return exp.title; };
        var isDefaultTitle = exp.isDefaultTitle = function (){return exp.title === exp.defaultTitle;};

        var suggestTitle = exp.suggestTitle = function (fallback) {
            if (isDefaultTitle()) {
                return getHeadingText() || fallback || "";
            } else {
                return exp.title || getHeadingText() || exp.defaultTitle;
            }
        };

        var renameCb = function (err, newTitle) {
            if (err) { return; }
            updateLocalTitle(newTitle);
            onLocal();
        };

        exp.updateTitle = function (newTitle) {
            if (newTitle === exp.title) { return; }
            // Change the title now, and set it back to the old value if there is an error
            var oldTitle = exp.title;
            Cryptpad.renamePad(newTitle, function (err, data) {
{'fraction_non_alphanumeric': 0.11680270194202083, 'fraction_numerical': 0.0, 'mean_word_length': 1.8161648177496037, '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': '1177479', 'n_tokens_mistral': 963, 'n_tokens_neox': 928, 'n_words': 235}