{"size": 1609, "ext": "js", "max_stars_repo_path": "src/js/homePage.js", "max_stars_repo_name": "PeterShevchuk/filmoteka", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/js/homePage.js", "max_issues_repo_name": "PeterShevchuk/filmoteka", "max_issues_repo_issues_event_min_datetime": "2020-07-28T08:27:57.000Z", "max_issues_repo_issues_event_max_datetime": "2020-07-28T08:27:57.000Z", "max_forks_repo_path": "src/js/homePage.js", "max_forks_repo_name": "PeterShevchuk/filmoteka", "max_forks_repo_forks_event_min_datetime": "2020-07-28T06:42:37.000Z", "max_forks_repo_forks_event_max_datetime": "2020-09-23T18:42:51.000Z"}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": 4, "avg_line_length": 38.3095238095, "max_line_length": 100, "alphanum_fraction": 0.6047234307}
class LoadList {
    constructor() {
        this.pageUlr = 'https://image.tmdb.org/t/p/w500';
        this.listImages = document.querySelector('.js-list');
        this.src = '../images/404.png';
        this.title = "";
    }

    progressBar() {
        this.winScroll = document.body.scrollTop || document.documentElement.scrollTop;
        this.height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
        this.scrolled = (this.winScroll / this.height) * 100;
        document.getElementById("myBar").style.width = this.scrolled + "%";
      }
    postList(array) {
        this.liArray = array.results.map(item => this.createList(item)).join('');
        this.listImages.innerHTML = this.liArray;
    }
    createList(array) {
        array.backdrop_path? this.src = this.pageUlr+array.backdrop_path : null;
        array.poster_path? this.src = this.pageUlr+array.poster_path : null;
        array.original_title? this.title = array.original_title : this.title = array.original_name;
        
        return `<li class="list__items" data-id="${array.id}">
            <img src="${this.src}" alt="${this.title}" class="list__itemsImg">
            <div class="list__layout">
                <p class="list__itemsTitle">${this.title}</p>
            </div>   
            </li>`;
    }
}

const loadPage = new LoadList();

window.onscroll = function() {loadPage.progressBar()};

jQuery(function(f){
    var element = f('.footer__btnSection');
    f(window).scroll(function(){
        element['fade'+ (f(this).scrollTop() > 0 ? 'In': 'Out')](500);           
    });
});