Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsantell/jquery-gh-repo
jQuery plugin for grabbing GitHub repo information (watchers, forks) and displaying them
https://github.com/jsantell/jquery-gh-repo
Last synced: about 2 months ago
JSON representation
jQuery plugin for grabbing GitHub repo information (watchers, forks) and displaying them
- Host: GitHub
- URL: https://github.com/jsantell/jquery-gh-repo
- Owner: jsantell
- License: mit
- Created: 2012-07-08T21:17:58.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-04T04:25:38.000Z (over 12 years ago)
- Last Synced: 2024-10-16T05:44:38.973Z (3 months ago)
- Language: JavaScript
- Homepage: http://jsantell.github.com/jquery-gh-repo/
- Size: 173 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery-gh-repo
jQuery plugin for grabbing GitHub repo information (watchers, forks) and displaying them
[View demo](http://jsantell.github.com/jquery-gh-repo)
## Options
* `data`: Name of field from API to display, ex: `watchers`, `forks` [View API](http://developer.github.com/v3/repos/)
* `repo`: Repository to query -- specify the whole GitHub url, ex: `http://github.com/jsantell/jquery-gh-repo`The repository can be specified in the options, in a data attribute `[data-gh-repo=http://github.com/jsantell/jquery-gh-repo]`, or if the element is an anchor, or a child of an anchor, those hrefs will be checked. All of those are checked in order until a proper repository is found.
## Example
View `./example/index.html` in repo to see it in action or [jsantell.github.com/jquery-gh-repo](http://jsantell.github.com/jquery-gh-repo)
```javascript
$('a').ghRepo({
data : 'watchers',
repo : 'http://github.com/jsantell/jquery-gh-repo'
});
```## Contributing
This project uses [smoosh](https://github.com/fat/smoosh) for compiling, linting.