{"size": 998, "ext": "js", "max_stars_repo_path": "common/widgets/launcher/assets/starter.js", "max_stars_repo_name": "webadmin87/rzwebsys7", "max_stars_repo_stars_event_min_datetime": "2015-02-10T08:51:50.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-28T08:09:34.000Z", "max_issues_repo_path": "common/widgets/launcher/assets/starter.js", "max_issues_repo_name": "nanson/rzwebsys7", "max_issues_repo_issues_event_min_datetime": "2015-01-29T12:44:39.000Z", "max_issues_repo_issues_event_max_datetime": "2016-07-29T08:52:23.000Z", "max_forks_repo_path": "common/widgets/launcher/assets/starter.js", "max_forks_repo_name": "nanson/rzwebsys7", "max_forks_repo_forks_event_min_datetime": "2015-01-14T08:05:25.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-29T02:22:34.000Z"}
{"max_stars_count": 33, "max_issues_count": 31, "max_forks_count": 16, "avg_line_length": 17.8214285714, "max_line_length": 84, "alphanum_fraction": 0.4448897796}
(function(win, $){

    win.AjaxStarter = function (url, callback) {

        this.url = url;

        this.callback = callback || function () { };

        this.page = 1;

        this.pagesNum = 1;

        this.procents = 0;

    }


    win.AjaxStarter.prototype.request = function () {

        var self = this;

        var dt = new Date();

        $.getJSON(this.url, {page: this.page, time: dt.getTime()}, function (data) {

            if (!data.errors) {

                self.page++;

                self.data = data;

                self.pagesNum = data.pagesNum;

                self.procents = (data.page / data.pagesNum) * 100;

                self.callback.apply(self);

                if (self.page <= self.pagesNum)
                    self.request();
                else
                    self.page = 1;

            } else {

                self.errors = data.errors;

                self.callback.apply(self);

            }


        });

    }

})(window, jQuery);