<commit_before>httpRequest = new XMLHttpRequest();

window.onload = function() {
    ref(document.location.pathname);
}

window.onpopstate = function(e) {
    request("/api" + document.location.pathname, function(response) {
        updateContent(response.title, response.content);
    });
}

window.onclick = function(ev) {

    if (ev.target.tagName == "A") {
        if (ev.target.host == document.location.host) {
            stop(ev);
            ref(ev.target.pathname);
            return false;
        }
    }

    return true;
}<commit_msg>fix: follow link only if primary mouse button is pressed<commit_after>httpRequest = new XMLHttpRequest();

window.onload = function() {
    ref(document.location.pathname);
}

window.onpopstate = function(e) {
    request("/api" + document.location.pathname, function(response) {
        updateContent(response.title, response.content);
    });
}

window.onclick = function(ev) {

    if (ev.target.tagName == "A" && ev.button == 0) {
        if (ev.target.host == document.location.host) {
            stop(ev);
            ref(ev.target.pathname);
            return false;
        }
    }

    return true;
}
{'fraction_non_alphanumeric': 0.1429801894918174, 'fraction_numerical': 0.0008613264427217916, 'mean_word_length': 2.6426332288401255, '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': '204655', 'n_tokens_mistral': 359, 'n_tokens_neox': 352, 'n_words': 65}