<commit_before># Make it so clicking on the link with given id-item makes the
# element with given id visible, and all others invisible.  Also,
# the clicked link gets the active class, and all others become
# inactive.
active_page = null
connect_links_and_pages = (page_ids, default_page=null) ->
    show_page = (id) ->
        active_page = id
        for p in page_ids
            if p == id
                $(p).show()
                $(p+"-item").addClass("active")
            else
                $(p).hide()
                $(p+"-item").removeClass("active")
    for p in page_ids
        $("a[href='"+p+"']").click((e) -> show_page(e.target.hash); return false)
    if default_page?
        show_page(default_page)
    else
        show_page(page_ids[0])
    
connect_links_and_pages(["#about", "#demo1", "#demo2", "#demo3"], "#demo1")<commit_msg>get rid of reference to "demo3"<commit_after># Make it so clicking on the link with given id-item makes the
# element with given id visible, and all others invisible.  Also,
# the clicked link gets the active class, and all others become
# inactive.
active_page = null
connect_links_and_pages = (page_ids, default_page=null) ->
    show_page = (id) ->
        active_page = id
        for p in page_ids
            if p == id
                $(p).show()
                $(p+"-item").addClass("active")
            else
                $(p).hide()
                $(p+"-item").removeClass("active")
    for p in page_ids
        $("a[href='"+p+"']").click((e) -> show_page(e.target.hash); return false)
    if default_page?
        show_page(default_page)
    else
        show_page(page_ids[0])
    
connect_links_and_pages(["#about", "#demo1", "#demo2"], "#demo1")
{'fraction_non_alphanumeric': 0.13937282229965156, 'fraction_numerical': 0.005807200929152149, 'mean_word_length': 2.4254473161033796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5074749', 'n_tokens_mistral': 531, 'n_tokens_neox': 522, 'n_words': 151}