<commit_before>var pendingVideo; // used when a video is dragged into 'new playlist' input

/** INIT
 ****************************************************************************/

function constructPlaylistsMenu() {
    var i,
        li,
        playlist;

    $('#playlists').html('');

    for (i = 0; i < playlistManager.playlists.length; i += 1) {
        playlist = playlistManager.getPlaylist(i);
        li = playlist.createListElem();
        li.appendTo('#playlists');
    }
}

$(document).ready(function() {
    if (logged_in) {
        playlistManager.pull(constructPlaylistsMenu);
    } else {
        constructPlaylistsMenu();
    }

    // NEW PLAYLIST BUTTON
    $('#new-playlist span').click(function() {
        var suggestedTitle = '',
            artist;

        if (pendingVideo) {
            artist = extractArtist(pendingVideo.title);<commit_msg>Remove loggedIn data on logout<commit_after>var pendingVideo; // used when a video is dragged into 'new playlist' input

/** INIT
 ****************************************************************************/

function constructPlaylistsMenu() {
    var i,
        li,
        playlist;

    $('#playlists').html('');

    for (i = 0; i < playlistManager.playlists.length; i += 1) {
        playlist = playlistManager.getPlaylist(i);
        li = playlist.createListElem();
        li.appendTo('#playlists');
    }
}

$(document).ready(function() {
    if (logged_in) {
        playlistManager.pull(constructPlaylistsMenu);
    } else {
        constructPlaylistsMenu();
    }

    // LOGIN/LOGOUT BUTTON
    $('#logout-link').click(function() {
        if (localStorage['loggedInPlaylists'] !== undefined) {
            localStorage.removeItem('loggedInPlaylists');
        }
        if (localStorage['loggedInSettings'] !== undefined) {
            localStorage.removeItem('loggedInSettings');
        }
    });

    // NEW PLAYLIST BUTTON
    $('#new-playlist span').click(function() {
        var suggestedTitle = '',
            artist;

        if (pendingVideo) {
            artist = extractArtist(pendingVideo.title);
{'fraction_non_alphanumeric': 0.2001906577693041, 'fraction_numerical': 0.0019065776930409914, 'mean_word_length': 2.7549194991055455, 'pattern_counts': {'":': 0, '<': 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': '2442552', 'n_tokens_mistral': 590, 'n_tokens_neox': 575, 'n_words': 114}