Greasy Fork

Greasy Fork is available in English.

Download github repo sub-folder

download github directory via one click, copy the single file's source code easily

当前为 2020-09-23 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
oe
评分
0 0 0
版本
0.2.2
创建于
2020-09-23
更新于
2020-09-23
大小
5.0 KB
许可证
暂无
适用于

It's a useful user script for Github users:

  1. allow you to donwload a sub-folder of a repo online without cloning the whole repository to your machine
  2. allow you to copy source code in repo's single file view

All its features are seamless integrated with Github, and works great with octotree.

Download Github screenshot

Usage

Configure the script manager

This script use script manager's Download feature to download single code file, and it must follow script manager's Secure restrictions, like Tampermonkey says:

for security reasons the file extension needs to be whitelisted at Tampermonkey's options page

The following steps showing you how to config that in Tampermonkey

You can added your custom file extension the whitelist by follow steps:

  1. open Tampermonkey extension settings page, in Chrome it's chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/options.html#nav=settings
  2. change General -> Config mode to Advanced
  3. Scroll to Downloads BETA, add file extension Regexp to the Whitelisted File Extensions:, e.g.: regexp /\.(js|ts|jsx|tsx|json|java|go|cpp|c|swift|cmd|sh|md|markdown|rb)$/

or you can add /\..*$/ to the list to allow any file extensions at your own risk