<commit_before>let contentMap = {};

for(let elem of document.body.children) {
    let tagName = elem.tagName.toLowerCase();
    switch(tagName) {
        case 'SCRIPT':
            // don't add script tags
            break;
        case 'HEADER':
        case 'FOOTER':
            contentMap[tagName] = elem;
            break;
        default:
            contentMap[elem.id] = elem;
            break;
    }
}

// current content focus (initializes to header)
// this should not be directly modified
// instead, use changeFocus() so we can have special behavior
let focus = contentMap.header;

function changeFocus(elem) {}

document.addEventListener('scroll', (event) => {
    event.stopPropagation();

    // TODO: scrollIntoView() stuff
    // console.log(event);
});<commit_msg>clean up TODO stuff with scrollIntoView<commit_after>let contentList = Array.from(document.body.children).filter(e => e.tagName.toLowerCase() !== 'SCRIPT');

// index of current content focus (initializes to header)
let focusIndex = 0;

document.addEventListener('scroll', event => {
    event.stopPropagation();

    // TODO
    // contentList[focusIndex].scrollIntoView({behavior: 'smooth', block: 'start'});
    // console.log(event);
});
{'fraction_non_alphanumeric': 0.13355048859934854, 'fraction_numerical': 0.0008143322475570033, 'mean_word_length': 2.9391025641025643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '4394483', 'n_tokens_mistral': 348, 'n_tokens_neox': 345, 'n_words': 91}