diff options
author | Valentin Popov <info@valentineus.link> | 2018-10-01 05:58:38 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-10-01 05:58:38 +0300 |
commit | d2ada7064ce60f2308e5efb614f0fe6cd5bc8fc8 (patch) | |
tree | ce2979ea22990767154d2750490c70b3f3419db0 /assets/javascript/github-0.0.1.min.js | |
parent | a0c6fc29747de8b48bfb496d5830c2ea7dbe6af7 (diff) | |
download | popov.link-d2ada7064ce60f2308e5efb614f0fe6cd5bc8fc8.tar.xz popov.link-d2ada7064ce60f2308e5efb614f0fe6cd5bc8fc8.zip |
Added file
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'assets/javascript/github-0.0.1.min.js')
-rw-r--r-- | assets/javascript/github-0.0.1.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/assets/javascript/github-0.0.1.min.js b/assets/javascript/github-0.0.1.min.js new file mode 100644 index 0000000..f71ac22 --- /dev/null +++ b/assets/javascript/github-0.0.1.min.js @@ -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}({}); |