{"size": 1104, "ext": "js", "max_stars_repo_path": "js/script.js", "max_stars_repo_name": "TUMxInteractionProgramming/challenges-week-3-OliviaAn", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/script.js", "max_issues_repo_name": "TUMxInteractionProgramming/challenges-week-3-OliviaAn", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/script.js", "max_forks_repo_name": "TUMxInteractionProgramming/challenges-week-3-OliviaAn", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.5428571429, "max_line_length": 170, "alphanum_fraction": 0.6322463768}
/* TASK 1*/
console.log('app is alive');

/* TASK 2 */
function switchChannel(channelName) {
   console.log('Tuning into channel ' +  channelName);
   document.getElementById('channel-name').innerHTML = channelName;
   document.getElementById('channel-location').innerHTML = 'by <a href="http://w3w.co/upgrading.never.helps" target="_blank" ><strong>upgrading.never.helps</strong></a>';

    /* TASK 3 change star back to unfilled when clicking on channel*/
    $("#channel-star").attr("src", "http://ip.lfe.mw.tum.de/sections/star-o.png");
}

/* TASK 3 toggle star */
function star() {
    if($("#channel-star").attr("src") === "http://ip.lfe.mw.tum.de/sections/star-o.png") {
        $("#channel-star").attr("src", "http://ip.lfe.mw.tum.de/sections/star.png");
    }else{
        $("#channel-star").attr("src", "http://ip.lfe.mw.tum.de/sections/star-o.png");
    }
}

/* TASK 4*/

function selectTab(tab) {
    $('#tab-bar button').removeClass('selected');
    $(tab).addClass('selected');
    console.log('Changing to tab ', tab);
}


/* TASK 5*/
function toggleEmojis() {
    $("#emojis").toggle();
}