<commit_before>window.addEventListener("load", function(event) {
    var menu = document.getElementById("contentAreaContextMenu");
    if (menu) {
        menu.addEventListener("popupshowing", setupMenuItems, false);
    }
}, false);

function setupMenuItems(event) {
    var menuItems = ['current', 'window', 'tab'];
    for (var i=0; i < menuItems.length; i++) {
        var item = document.getElementById('gotourl-' +  menuItems[i]);
        item.hidden = !gContextMenu.isTextSelected;
    }
}

function gotoURL(where) {
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var url = focusedWindow.getSelection();

    switch(where) {
    case "current":
        gBrowser.loadURI(url);
        break;
    case "window":
        window.open(url);
        break;
    default:
        window.getBrowser().addTab(url);
    }
}<commit_msg>Namespace *all* the functions.<commit_after>window.addEventListener("load", function(event) {
    var menu = document.getElementById("contentAreaContextMenu");
    if (menu) {
        menu.addEventListener("popupshowing", gotoURLInit, false);
    }
}, false);

function gotoURLInit(event) {
    var menuItems = ['current', 'window', 'tab'];
    for (var i=0; i < menuItems.length; i++) {
        var item = document.getElementById('gotourl-' +  menuItems[i]);
        item.hidden = !gContextMenu.isTextSelected;
    }
}

function gotoURL(where) {
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var url = focusedWindow.getSelection();

    switch(where) {
    case "current":
        gBrowser.loadURI(url);
        break;
    case "window":
        window.open(url);
        break;
    default:
        window.getBrowser().addTab(url);
    }
}
{'fraction_non_alphanumeric': 0.13903432228039558, 'fraction_numerical': 0.0011634671320535194, 'mean_word_length': 3.1849148418491486, 'pattern_counts': {'":': 4, '<': 5, '<?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': '1980806', 'n_tokens_mistral': 508, 'n_tokens_neox': 498, 'n_words': 101}