<commit_before>var link = document.querySelector('link[rel~="icon"]');
if (!link) {
    link = document.createElement('link');
    link.setAttribute('rel', 'shortcut icon');
    document.head.appendChild(link);
}

var queryParameters = QueryParameters.getQueryParameters(document.location.search);

link.href = queryParameters.favIconUrl;
document.title = queryParameters.title;

var update = function () {
    document.getElementById('favicon').src = queryParameters.favIconUrl;
    document.getElementById('title-text').innerText = queryParameters.title;
    document.getElementById('startupUrl').innerText = queryParameters.startupUrl;
    document.getElementById('startupUrl').href = queryParameters.startupUrl;
    document.getElementById('currentUrl').innerText = queryParameters.currentUrl;
    document.getElementById('currentUrl').href = queryParameters.currentUrl;
};

var onReady = function () {
    update();
};

if (chrome && chrome.runtime && chrome.runtime.onMessage) {
    chrome.runtime.onMessage.addListener(
        function (request, sender, sendResponse) {
            if (request.type === 'favIconUrl') {
                queryParameters.favIconUrl = request.data;
                link.href = request.data;
            }
            else if (request.type === 'currentUrl') {
                queryParameters.currentUrl = request.data;
            }
            else if (request.type === 'title') {
                queryParameters.title = request.data;
                document.title = request.data;
            }
            else {
                return;
            }
            update();
        });
}<commit_msg>Add warning log message to placeholder if no connection could be established to extension<commit_after>var link = document.querySelector('link[rel~="icon"]');
if (!link) {
    link = document.createElement('link');
    link.setAttribute('rel', 'shortcut icon');
    document.head.appendChild(link);
}

var queryParameters = QueryParameters.getQueryParameters(document.location.search);

link.href = queryParameters.favIconUrl;
document.title = queryParameters.title;

var update = function () {
    document.getElementById('favicon').src = queryParameters.favIconUrl;
    document.getElementById('title-text').innerText = queryParameters.title;
    document.getElementById('startupUrl').innerText = queryParameters.startupUrl;
    document.getElementById('startupUrl').href = queryParameters.startupUrl;
    document.getElementById('currentUrl').innerText = queryParameters.currentUrl;
    document.getElementById('currentUrl').href = queryParameters.currentUrl;
};

var onReady = function () {
    update();
};

if (chrome && chrome.runtime && chrome.runtime.onMessage) {
    chrome.runtime.onMessage.addListener(
        function (request, sender, sendResponse) {
            if (request.type === 'favIconUrl') {
                queryParameters.favIconUrl = request.data;
                link.href = request.data;
            }
            else if (request.type === 'currentUrl') {
                queryParameters.currentUrl = request.data;
            }
            else if (request.type === 'title') {
                queryParameters.title = request.data;
                document.title = request.data;
            }
            else {
                return;
            }
            update();
        });
}
else
    console.warn("Couldn't add listener for messages from extension.");
{'fraction_non_alphanumeric': 0.12255617157864021, 'fraction_numerical': 0.0, 'mean_word_length': 2.851685393258427, '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': '7436366', 'n_tokens_mistral': 879, 'n_tokens_neox': 852, 'n_words': 161}