Added file

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2018-10-01 06:58:38 +04:00
parent a0c6fc2974
commit d2ada7064c
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3

1
assets/javascript/github-0.0.1.min.js vendored Normal file
View File

@ -0,0 +1 @@
var Github=function(t){"use strict";return t.addComment=function r(){var t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:"document",e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},n=$("#template").html(),u=new Date(e.updated_at),a=doT.template(n);$(t).append(a({avatar:e.user.avatar_url,content:e.body_html,date:u.toDateString(),url:e.user.html_url,user:e.user.login}))},t.getComments=function a(){var t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:"",e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:0,n=arguments[2],u=$.ajax({url:"https://api.github.com/repos/"+t+"/issues/"+e+"/comments",headers:{Accept:"application/vnd.github.v3.html+json"},dataType:"json"});u.fail(function(t,e){return n(e,null)}),u.done(function(t){return n(null,t)})},t}({});