{"size": 862, "ext": "js", "max_stars_repo_path": "public/javascripts/service/yona.showSubtask.js", "max_stars_repo_name": "lamia100/yona", "max_stars_repo_stars_event_min_datetime": "2016-01-19T09:03:06.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-22T09:15:49.000Z", "max_issues_repo_path": "public/javascripts/service/yona.showSubtask.js", "max_issues_repo_name": "lamia100/yona", "max_issues_repo_issues_event_min_datetime": "2016-01-22T00:10:08.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T23:57:12.000Z", "max_forks_repo_path": "public/javascripts/service/yona.showSubtask.js", "max_forks_repo_name": "lamia100/yona", "max_forks_repo_forks_event_min_datetime": "2016-01-20T06:46:22.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-19T12:27:43.000Z"}
{"max_stars_count": 503, "max_issues_count": 715, "max_forks_count": 235, "avg_line_length": 29.724137931, "max_line_length": 73, "alphanum_fraction": 0.5928074246}
/**
 * Yona, 21st Century Project Hosting SW
 * <p>
 * Copyright Yona & Yobi Authors & NAVER Corp. & NAVER LABS Corp.
 * https://yona.io
 **/

function _initShowSubtasks(){
    var showSubtasksAlways = localStorage.getItem('showSubtasksAlways');
    var $toggleShowSubtasks = $("#toggle-show-subtasks");

    if( showSubtasksAlways  === 'true'){
        $toggleShowSubtasks.prop('checked', true);
        $(".child-issue-list").show();
    }
    $toggleShowSubtasks.on('click', function () {
        if(this.checked){
            localStorage.setItem('showSubtasksAlways', true);
            $(".child-issue-list").show();
        } else {
            localStorage.setItem('showSubtasksAlways', false);
            $('.post-item').removeClass('highlightBg').css("cursor", "");
            $(".child-issue-list").hide();
        }
    });
}

_initShowSubtasks();
