GithubHelp home page GithubHelp logo

softvar / enhanced-github Goto Github PK

View Code? Open in Web Editor NEW
2.0K 41.0 177.0 6.85 MB

:rocket: Browser extension to display size of each file, download link and copy file contents directly to the clipboard

Home Page: https://chrome.google.com/webstore/detail/github-plus/anlikcnbgdeidpacdbdljnabclhahhmd

License: MIT License

JavaScript 73.59% HTML 26.41%
chrome-extension clipboard copy-paste file-size github-extension chrome-browser hacktoberfest

enhanced-github's Introduction

Enhanced GitHub

Browser extension that adds useful features on GitHub website


Chrome Web Store Chrome Web Store

Firefox Users Firefox Add-on

Microsoft Edge Add-on

Build Status

github-plus - Chrome Extension to display file size, download & copy link | Product Hunt Embed

Supported Browsers

Chrome Install extension from Chrome Web Store

Firefox Install add-on from Firefox Add-ons

Microsoft Edge Install extension from Microsoft Edge Add-ons

Website

Home

Features

  • Displays repo size.
  • Displays each file size for every active branch (not applicable for folder / symlink).
  • Show download link for each file (not applicable for folder / symlink).
  • Copy file's contents directly to Clipboard (just won't work for markdown files).
  • Download file while viewing its contents.

The extension handles the SPA behavior of GitHub website from v3.0.0 onwards :)

Note: For private repos(Issue #6), GitHub Access Token is required. Follow the steps mentioned below to add your GitHub Access Token.

Permissions required

  • "*://*.github.com/*" - for running on github.com domain.
  • storage - for storing GitHub access token on your local system. GitHub Access token is required for private repos and for handling API rate-limiting issues.
  • webRequest - to support GitHub being a single-page-application now. Read this detailed blog.
  • webNavigation - to support GitHub being a single-page-application now. Read this detailed blog.

Author

Varun Malhotra Varun Malhotra Website 𝕏 StackOverflow LinkedIn GitHub

GitHub API Rate Limiting

Since this extension fetches data using GitHub public v3 API for showing file size and download_url, it consumes free quota which is very less GitHub API Rate Limiting.

To tackle this, create a new GitHub Access Token.

  1. If logged-in, visit https://github.com/settings/tokens

  2. Generate a new token, select repo scope and create a one.

  3. Copy and store the generated token which looks something like: 17c1a8d5b399d66b6212382d98d4c67a94d58955 (a fake one :P).

  4. Click on extension icon and then on Settings-Options on top right.

    OR

    Right-click on enhanced-github extension and click on Options in the dropdown menu.

  5. Enter the valid GitHub Access Token

  6. Click on SAVE and Enjoy the benefits.

This browser extension will automatically pick this valid access token and Bingo!

Screenshots

New GitHub Design - Blog

Screenshot of each file size and it's download link

Screenshot of Copy file contents and download link

Old GitHub Design

Screenshot of each file size and it's download link

Screenshot of Copy fle contents and download link

Libraries Used

Development

  1. Clone this repo
  2. Run yarn dev for generating packaged folder specifically for extension stuff.
  3. Go to extension page. For chrome extensions chrome://extensions, Firefox Add-ons about:debugging, and Microsoft Edge Extensions edge://extensions/.
  4. Enable developer mode
  5. Click on load unpacked extension and select the generated folder.
  6. [Admin Access Only] - run yarn build for generating zip file to be uploaded on Chrome Web Store, Firefox Add-ons, and Microsoft Edge Addons.

PRs are most welcome :)

Changelog

CHANGELOG.md

Contributors

Author: Varun Malhotra(@softvar)

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Policy

Refer Privacy Policy.

Enhanced GitHub Extension doesn't collect/share/care about your data at all.

Asks for GitHub Access Token for private repos and if Rate Limiting is your concern.

Copyright and License

❗️ This extension is not sponsored by, endorsed by, or an official project of GitHub. This is a personal project and is developed solely for providing additional functionalities on GitHub website.

The MIT license (MIT)

Copyright (c) 2016-2021 Varun Malhotra

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.

enhanced-github's People

Contributors

bandhiyahardik avatar denvercoder1 avatar dependabot[bot] avatar friederbluemle avatar gauravmuk avatar mingrammer avatar monkeywithacupcake avatar shuuji3 avatar sitiom avatar softvar avatar toxblh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enhanced-github's Issues

Feature Request: improve Git's diff. first steps: tab size, ignore whitespace

Sometimes I want to use github.com's file diffing ability.
Even though it's a side-by-side view, they set the default tab size to 8.
I found an open source chrome app that lets me adjust that
chrome.google.com/webstore/detail/github-custom-tab-size
Upshot: ?ts=4 changes the rendering to 4

I thought 'Someone must be working on a chrome app to help with github.com use."
I see you are. Cool. Hope you add this feature.
Being able to do other magic would be awesome,
Ignore whitespace in the diff is similar
?ws=1

Maybe you'll find more inspiration at github.com/tiimgreen/github-cheat-sheet

Question: Why do you need my browser history?

I just got a notification from chrome saying enhanced github has been disabled due to new permissions. It asks me if i want to give the extension permissions to read my browser history. Why?

when download a script, it always open a new tabs in chrome without downloading.

Hi, thank you for sharing this excellent repo. 1. When I useCtrl+click to download a python script, e.g here, it always opens a new tab in chrome without downloading; 2. Then I use Ctrl + S to save the script, but it always changes the format of the file from 'XX.py' to 'XX.py.txt'. 3. it seems is related to this and this, but I haven't found out a solution. Can you give me some help? thank you very much!

Feature Request: Thumbnail preview for image files

It would be nice if image files (SVG, JPEG, PNG, GIF) could get a thumbnail preview image instead of a file icon in the file list. If a folder contains (almost) only image files, a gallery preview with larger previews would also be helpful – but beware, I know repositories with image folders that literally hold thousands of files (e.g. Twemoji).

Make it work on enterprise github

Some people like us work on enterprise (privately hosted) github. Allow the custom url to be configured instead of hardcoding it to github.com/*

Feature request: Support Safari 14.0

Since Safari 14.0 (with Xcode 12), Apple supports the automatic conversion of Chrome extension to Safari extension ( Documents), I tested it and found that the xcrun safari-web-extension-converter produced the following warning:

➜  enhanced-github git:(master) xcrun safari-web-extension-converter --app-name "Enhanced GitHub" --bundle-identifier "com.example.safari.enhanced-github" --objc --project-location ../enhanced-github-safari ./
Xcode Project Location: /Users/patrickfu/code/enhanced-github-safari
App Name: Enhanced GitHub
App Bundle Identifier: com.example.safari.enhanced-github
Language: Objective-C
Is this correct? [yes]: yes
Warning: The following keys in your manifest.json are not supported by your current version of Safari. If these are critical to your extension, you should review your code to see if you need to make changes to support Safari:
	persistent
➜  enhanced-github git:(master)

Despite this warning, the Safari extension Xcode project can still be generated, and the app can be archived and exported normally, but it does not work at all. (I have been configured Github access token)

Screenshot2020-12-19 15 36 43

I’m not familiar with the development of web extensions, and I don’t know if this problem is caused by the above warning.

Could you make this extension compatible with Safari? It does not need to publish to AppStore. We can use our own Apple developer account to sign the extension. Sincere thanks🥰

Feature Request: Improve the network graph on the insights page

I regularly use the network graph on the github insights page to catch up with a repo's changes, but I find it's generally not very easy to use. Some small tweaks that I'd like to request are:

  • responsive width, allow manually resizing of said graph or maybe a fullscreen mode
  • ability to save the entire graph as an image
  • go to the end of the graph by default (currently you have to drag manually or press shift+arrow_right)

Feature Request: Fork with latest commits

Many times forks have useful commits ahead of the parent but the forkers don't bother to send pull request to the parent.
The only way to figure this out this is to go into each of the forked repo and check its commits. It would great if we can either highlight the forks with forward commits in list view or rearrange the fork list in order of date of latest commit.

About the Icons

@s0ftvar Nice one. It's a bit buggy, though. Downloading dotfiles convert them to something like gitignore.txt. Also, can you downtone these icons to be grey in color and a bit more minimal icons? Like this http://cloud.ahmda.ws/rYOl31L so that the UI doesn't feel overwhelming?

I think #999 color would do.
A bit padding-left would be great. Something like http://cloud.ahmda.ws/Yc8AbJ1
Thanks!

No enhancement if navigating Forward / Back

While navigating around GitHub, I was confused when most of my GitHub tabs were not showing any enhanced info.

If you press Forward or Back, the GitHub page will not be enhanced. It only works if you explicitly press 'refresh' or load the page for the first time.

Unfortunately I had to disable the extension because it's too inconsistent. By my use patterns, I can't see the enhanced info most of the time.

It would be awesome if this could be fixed.

The version 5.0. brought a layout change in some pages of GitHub

Hello there, thank you very much for such a great plugin!

I just find that the new version 5.0.1 seems to have brought a layout change in some pages of GitHub.

Let's look at the commits page https://github.com/ecomfe/zrender/commits/next

It's normal before I enable the plugin.

image

After I enabled the plugin. It became untidy and disorganized the original layout.

image

Please help to check if this is a bug. If confirmed, it would be better to fix ASAP.
Thanks!

Not support Private Repository.

When I view my private repository, it looks like not display the file size. And when view my public repository, it woks. Is there any one has this problem?

Feature Request: Show +/- lines of code in PR list

Frequently when viewing a giant list of PRs for a project I'm curious about which ones are large bodies of work vs small patches. This is especially hard to see for huge projects (think kubernetes and the like). I'd love to see able to add a +/- or simple "S/M/L/XL" size on the list of PRs to find the ones worth looking at.

Feature Request: Firefox version

I really like this extension but I switch to Firefox recently and can't use it anymore. I have tried to search an add-on or a script which has the similar function, and I also tried chrome store foxified but it didn't work. So it will be nice if you can release a Firefox version. Thanks.

Enhancement: Shortcut for "Create automated security fix"

I find my self getting lots of these security notifications for my repositories.

Selection_004

I takes about 5 clicks to get from a notification to the following detail page, which has the button to create an automated security pull request

Selection_005

Could a feature be made to add these links directly to the notifications list?

So I could just click them one by one, without navigating around needlessly.

Cheers,
Ben

[discussion] design/order

Hey, I would like improve the UX a little with this extension and like to discuss this with you all.

  1. I would place the filesize between the commit-message and commit-time and would remove the download icon. Why? The download functionality is obvious when looking at the screenshots and reading the README + it would look cleaner. The blue of the icons distracts the focus of the user IMO.

  2. I would place the repo size between the contributors and the licence because the licence is always the last as it just appears when you have a licence in your repo

  3. I would replace the octicon-database-icon with something else like the octicon-package-icon, which tells better that this is the size of that repository/package

  4. While showing a file: Instead of saying Copy File I would say Copy content (title="Copy the contents of this file to your clipboard.")

  5. While showing a file: Remove the icon here as well and on click directly download the file instead of showing the raw data (there is already a button for this)

Simpler Way To Add The GitHub Token

Thanks for the great extension!

It would be cool if the GitHub token could be added in an options panel of the extension and not via the developer tools :-)

Doesn't display for private repos

Nice little extension!
But unfortunately it doesn't seem to work for private repos.
Would be great if all the deets would be visible to the owner.
Have the feeling Github OAuth would be required in the ext - but well worth it!

Feature Request: Github clone-to header modifier

  • Add a feature using which you can edit the Clone button.
  • You can add options like clone to Fork or clone to Sourcetree and maybe even VSCode/VSCodium and other desktop clients
  • There must also be an option to remove the default client options like clone to Visual Studio or dektop
  • Also add option for a custom clone-to button that modifies the header which for me is x-github-client:// for Github Desktop Beta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.