github相关的网页工具

github相关的网页工具

此文推荐一下我比较喜欢的github网页工具。

Profile Summary For Github: 查看用户信息

Profile Summary For Github

使用方法:

直接打开上面的连接,然后输入github id就好了。

效果截图:

image-20210313151947530

Github Repo Info: 查看仓库的大小和创建时间

使用方法:

新建一个浏览器书签:

url填写为

javascript:function bytesToSize(bytes){var sizes=['B','KB','MB','GB','TB','PB'];for(var i=0;i<sizes.length;i++){if(bytes<=1024){return bytes+' '+sizes[i]}else{bytes=parseFloat(bytes/1024).toFixed(2)}};return bytes+' PB'} function fetchRepoDetails(url,pathArray,rateLimited,withoutToken){var xmlHttp=new XMLHttpRequest();xmlHttp.onreadystatechange=function(){var resp=null;if(xmlHttp.readyState===4){if(xmlHttp.status===200)resp=JSON.parse(xmlHttp.responseText);else if(!rateLimited&amp;&amp;xmlHttp.status===403)return fetchRepoDetails(url,pathArray,!0,!0);if(!resp){if(xmlHttp.status===403){return alert('Rate limit happened you\'re done for the day, you\'ll '+' be able to use it normally tomorrow')} var githubPage=['pulls','issues','marketplace','explore','settings','contact','community','about','features'].indexOf(pathArray[1])>-1;if(pathArray.length>2&amp;&amp;!githubPage){var promptMsg='Repository not found. If you want this bookmarklet to work for '+'private or private organisation repositories click OK or press ENTER key to read the guide.';if(window.confirm(promptMsg)){window.open('https://syncwithtech.org/github-repos-size-creation-date/#privateorganizationrepositories')}}else{alert('Not a valid GitHub repository page')} return} var date=new Date(resp.created_at);var dateArr=date.toString().split(' ').splice(1,3);dateArr[1]+=',';var text='Created on: '+dateArr.join(' ')+'\nSize: '+bytesToSize(resp.size*1024);alert(text)}};xmlHttp.open('GET',url);/* xmlHttp.setRequestHeader('Authorization', 'token abc'); */xmlHttp.send()} function evaluate(){if(window.location.host!=='github.com'){alert('Not a valid GitHub page.');return} var pathArray=window.location.pathname.split('/');var url='https://api.github.com/repos'+pathArray.slice(0,3).join('/');fetchRepoDetails(url,pathArray)} evaluate();" onclick="javascript:alert('Drag this Bookmarklet to your bookmarks toolbar');return false;

名字可为 GitHub Repo Info

当访问仓库的时候,可以直接点击书签栏的标签。

效果截图:

image-20210313151154022

更多信息访问:How to Know the Size and Creation Date of GitHub Repositories

Git History: 查看文件的历史记录

使用方法:

在我们查看github仓库里面的某个文件的时候,如果需要知道这个文件的历史编辑记录的话,可以将地址栏的github.com改成github.githistory.xyz

更多信息请访问: Git History

效果截图:

image-20210313152551119

DownGit: 下载仓库里面的文件夹/文件

DownGit

需要注意的是,这个网站是部署在github page上面的,而github.io这个域名下的地址好像不能直接被访问到了。

效果截图:

image-20210313151556557

posted @ 2021-03-13 15:28  Blithe-Chiang  阅读(225)  评论(0编辑  收藏  举报