You can create your own userscript power by webpack/es6/typescript/etc by starting from this template
If you have any issues with this script, please create an issue on Github
- download github source code online: allow you to download whole repo, a sub-folder of a repo or a single file online without
git clone
locally - seamless integration: seamless integrated with Github(click file icon in file list to download), and works great with octotree.
To use user scripts you need to first install a user script manager. Which user script manager you can use depends on which browser you use.
- Chrome: Tampermonkey or Violentmonkey
- Firefox: Greasemonkey, Tampermonkey, or Violentmonkey
- Safari: Tampermonkey or Userscripts
- Microsoft Edge: Tampermonkey
- Opera: Tampermonkey or Violentmonkey
- Maxthon: Violentmonkey
- Dolphin: Tampermonkey
- UC: Tampermonkey
- install script via greasyfork, greasyfork home page
- install script via openuserjs, openuserjs home page
Due to github api requests rate limit, if you use DownGit frequently, you may failed to download files with it. Then you can click Github Auth button in the center of DownGit to auth your account with this app.
This script use Downgit(sourcecode) to download github sub-folder. DownGit is forked from MinhasKamal, I just added Github Auth feature. Thanks to MinhasKamal
无需克隆GitHub仓库, 一键在线下载 Github仓库子文件夹; 同时还能在源码详情页一键复制源码.
你也可以使用模版 template使用 webpack/es6/typescript/等技术=来创建你自己的 userscript.
如果你使用中遇到任何问题, 欢迎在Github 上提交 issue
- 在线下载Github仓库源码: 你可以在线下载整个仓库、仓库的某个文件夹、单个文件的代码, 无需在机器上使用
git clone
命令下载完整仓库 - 无缝集成: 与 GitHub 无缝集成(点击文件列表左侧图标即可直接下载), 看起来就像是原生功能, 与 Github 增强扩展 octotree 也能无缝配合
在线下载Github仓库的文件夹功能使用开源项目 DownGit(源码) 实现. 该项目fork自MinhasKamal, 本人增加了GitHub auth授权功能, auth 授权后, downgit则拥有更多的Github API调用频次, 即可以用于下载更多github文件.
Chrome 用户推荐安装浏览器扩展: Tampermonkey
其他选择可参考: 安装一个用户脚本管理器
因为Github对第三方应用调用API频率有限制, 如果你经常使用DownGit下载文件, 则可能出现下载失败的情况.
此时就建议你点击网站中间的 Github Auth 按钮进行 Auth 授权, 这样 DownGit 可以拥有更多api调用次数, 能下载更多的文件.
- navigate to
chrome://flags/#allow-insecure-localhost
, enable insecure localhost - navigate to
chrome://extensions/?id=dhdgffkkebhmkfjojejmpbldmpobfkfo
(Chrome manage extensions page ofTampermonkey
) and enableAllow access to file URLs
(you need to manual reload page when dev userscript, see #475 for more detail)
yarn
yarn dev
- open https://127.0.0.1:8080/download-git-userscript.proxy.user.js in browser(click
Advanced
->proceed
if it shows a security warning ) to install the proxy script - dev code, reload github.com webpage after userscript changed