Sha256: 3618a5fe4bd689bb60657be0c7c544fca0a0cc6652d7bcd4d365175290e7a6bc

Contents?: true

Size: 927 Bytes

Versions: 3

Compression:

Stored size: 927 Bytes

Contents

jQuery(document).ready(function (d) {
    d(".github-box").each(function () {
		var i = d(this);
		var f = i.data("repo");

        d.ajax({
            url: "https://api.github.com/repos/" + f,
            dataType: "jsonp",
            success: function (n) {
                var m = n.data,
                    l, o = "unknown";
                if (m.pushed_at) {
                    l = new Date(m.pushed_at);
                    o = (l.getMonth() + 1) + "-" + l.getDate() + "-" + l.getFullYear()
                }
                i.find(".watchers").text(m.watchers);
                i.find(".forks").text(m.forks);
                i.find(".description span").text(m.description);
                i.find(".updated span").html(o);
                if (m.homepage != null) {
                    i.find(".link").append(d("<a />").attr("href", m.homepage).text(m.homepage))
                }
            }
        })
    })
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-github-plugin-1.0.2 assets/js/jquery.github.widget.js
jekyll-github-plugin-1.0.1 assets/js/jquery.github.widget.js
jekyll-github-plugin-1.0.0 assets/js/jquery.github.widget.js