7 Star 36 Fork 7

莫粒 / octotree

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

中文说明

这啥玩意

基于octoree二次开发的浏览器插件,在git@osc的项目页面提供一个树形目录结构,方便用户浏览。

如何安装

例如安装到谷歌浏览器,直接在浏览器的扩展,开启开发者模式,然后将 tmp/chrome 目录导入即可。

如何二次开发

安装nodejs,安装gulp,然后在项目目录执行 gulp 这个命令(会有各种库要安装),然后就进入了开发模式。 修改的代码,实时在浏览器中生效(当然,你还是要刷新浏览器的),非常方便。

预览

效果图

Octotree

Browser extensions (Chrome, Firefox, Opera and Safari) to display GitHub code in tree format. Useful for developers who frequently read source in GitHub and do not want to download or checkout too many repositories. Features:

  • Easy-to-navigate code tree like IDEs
  • Fast browsing with pjax
  • Customizable hotkey
  • Support private repositories (see instructions)
  • Support GitHub Enterprise (Chrome and Opera only, see instructions)

Install on Chrome, Firefox and Opera

Install on Safari

The prebuilt packages for all extensions are located in the dist folder. For security reason, only download Octotree from this location.

  • Safari: drag safari.safariextz to the browser and follow on-screen the instructions

GitHub access token

Octotree uses GitHub API to retrieve repository metadata. By default, it makes unauthenticated requests to the GitHub API. However, there are two situations when requests must be authenticated:

When that happens, Octotree will ask for your GitHub personal access token. If you don't already have one, create one, then copy and paste it into the textbox. Note that the minimal scopes that should be granted are public_repo and repo (if you need access to private repositories).

Alternatively, you can manually enter or update the token by following these steps:

  • Navigate to any GitHub repository
  • Open the developer console of your browser
  • Execute the following line:
localStorage.setItem('octotree.github_access_token', 'REPLACE WITH TOKEN')

Note: if you use GitHub Enterprise, each site will need its own access token. Therefore, Octotree stores access token on a per-site basis.

GitHub Enterprise

By default, Octotree only works on github.com. To support GitHub Enterprise on Chrome and Opera, you must grant Octotree sufficient permissions. Follow these steps to do so:

  • Navigate to any GitHub repository on github.com
  • Open Octotree's settings panel
  • Fill in the GitHub Enterprise URLs textbox, one URL per line
  • Click Save and accept any permission prompt
  • Navigate to your GitHub Enterprise site
  • You might be asked to create an access token

Changelog

v1.7.1

  • Fix space between tree and GitHub contents due to GitHub DOM change

v1.7.0

  • Support direct downloading when hovering a file

v1.6.4

  • Fix bug detecting branch/tag due to GitHub DOM change

v1.6.3

  • Fix bug when switching to branches with slashes in their names

v1.6.2

  • Fix branch selection no longer works due to GitHub change

v1.6.1

  • Update buttons' style to match GitHub new button style

v1.6

v1.5.3

v1.5.2

v1.5

  • Option to show in non-code pages
  • Option to load tree only when sidebar is visible
  • Option to configure tab size
  • Bug fixes

v1.4.1

  • New header to match new GitHub design
  • Bug fixes

v1.4

  • Support GitHub enterprise
  • Change default hotkey (cmd+b for Safari and cmd+shift+s for all other browsers)
  • Some other minor changes

v1.3

  • Setting panel allowing:
  • Changing access token
  • Changing hotkeys
  • Changing sidebar default visibility
  • Changing folder collapsing option
  • Sidebar appears better in large monitors
  • More responsive in big repositories
  • And bug fixes

v1.2

  • Hide sidebar by default (upon many user requests)
  • Hotkey (cmd+b, ctrl+b) to toggle sidebar
  • Sidebar is now resizable
  • Support rendering submodules
  • Reflect GitHub selection to Octotree
  • New sidebar header and progress indicator
  • And bug fixes

v1.1

  • New UI that blends better with GitHub!
  • Hide Octotree on non-code pages
  • When asking for token, show more detailed message and not fly out automatically
  • Extend pjax timeout to work better with big files
  • Sanitize file and folder names before displaying
  • Fix error when a branch name contains slashes
  • Gulp script to build for Chrome, Firefox and Safari
  • And some other minor changes

Credit

  • Many thanks to all contributors who submit pull requests, report bugs and suggest ideas
  • Extension icon by pstadler
The MIT License (MIT) Copyright (c) 2014 Buu Nguyen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

为git@osc的项目页面提供一个树形结构目录,方便用户浏览。基于 https://github.com/buunguyen/octotree 修改 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/moli/octotree.git
git@gitee.com:moli/octotree.git
moli
octotree
octotree
master

搜索帮助