mdo / github-buttons Goto Github PK
View Code? Open in Web Editor NEWShowcase the success of any GitHub repo or user with these simple, static buttons with dynamic counts.
Home Page: https://ghbtns.com
License: Apache License 2.0
Showcase the success of any GitHub repo or user with these simple, static buttons with dynamic counts.
Home Page: https://ghbtns.com
License: Apache License 2.0
Hi Chris,
it seems that when you try to delete a permission for a user doesn't work. Have you try it? this is the error that throws:
Fatal error: Uncaught exception 'APIException' with message '0: Curl request failed'
Cheers,
Marvi
Just started getting a JS error using github-buttons
:
Uncaught TypeError: Cannot call method 'toString' of undefined github-btn.html:195
The code I use in my website :
<iframe src="http://ghbtns.com/github-btn.html? user=WeCase&repo=WeCase&type=fork&count=true&size=large"allowtransparency="true" frameborder="0" scrolling="0" width="130" height="30">
It counts 9 but the correct one is 14
i made a javascript version: https://github.com/jonathanong/github-buttons
however, i don't want to maintain this. anyone want to maintain it? host it on a CDN? etc? replace this repo with it?
I think "Star" and "Watch" has the different meaning.
Cool new repo @markdotto!
Possibly add button.target = '_blank' so that the link opens in a new window instead of the iframe.
https://github.com/markdotto/github-buttons/blob/master/github-btn.html#L145
I'm getting a strange protocol must match error.
Uncaught SecurityError: Blocked a frame with origin "http://ghbtns.com" from accessing a frame with origin "http://localhost:3000". Protocols, domains, and ports must match.
This is my iframe code:
<iframe src="http://ghbtns.com/github-btn.html?user=jasonshark&repo=oakland-crime-api&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe>
How can http not match http? I am running a node.js express server. I'm hoping this isn't a chrome issue. Anyone else run into this?
The github buttons counters everywhere are currently broken. Perhaps a server issue?
I know you have addressed SSL in the readme, and beyond selfhosting could you offer SSL on your domain using a free SSL solution like https://www.startssl.com/ ?
I think it would be helpful others as I continue to run into gh-pages where not just your buttons but all of the resources have been included with explicit HTTP protocol and fail to work. This is made more complicated by the use of extensions like https everywhere which treat github as a secure only site.
Hi thanks for these great buttons good work!!! I'm making use of them at d2p2.pro/download
Just an idea for an addition, could you add a "report issue" button that jumps straight to: github.com/USER/REPO/issues/new with a count of the current issues?
Cheers!
Hi Mark.
Long time fan, first time contributor. I noticed you removed jQuery from the codebase through a pull request, but the docs still say it's in there. Now, while a huge fan of jQuery, if you don't have it, you probably shouldn't say you do.
No rush to get back to me, just wanted to make sure you were aware of the issue.
XOXO,
Dave
Seen among others on Twitter Bootstrap homepage http://twitter.github.com/bootstrap/
Hi. I made my own version of this that I use on my github pages. It only has support for the Star button with the large size. The only thing you can customize is the repo.
Include these files on your website:
Then add the button like this:
site.github_repo
is stefansundin/superf4
in this case.Example:
Just want to put this here in case anyone wants to copy it.
Cheers.
I made a different javascript version at ntkme/github-buttons.
http://markdotto.github.com/github-buttons/ currently shows me 404 Not Found
. What happened?
It doesn't point to the correct urls.
<url>/toggle_watch
for watch
<url>/fork_select
for fork
and for following:
https://github.com/users/follow?target=<user>
It would be cool to have similar functionality for a "Download on Github" button like on the demo page
Note: also the bugtracker link in the readme points to "markdotto/github-buttons/issues" instead of "mdo/github-buttons/issues"
Would be nice to have a way of including these buttons that didn't rely on the use of an iframe. There isn't much JS involved, so it would probably be better to roll it up with a site's own scripts...maybe even have the buttons work without JS as only the count requires it.
I've noticed tonight, while reviewing the work of a few developers, I was repeatedly confronted with an alert that
"For security reasons, framing is not allowed."
http://cl.ly/image/3L3y3B381o2B
and then am redirected to the 404 page for what used to be the Github Pages URL for this project!
One such affected project is @stolksdorf's Parallax JS demo page, so you can head over there (at the moment) to see this redirect in action. (PS, heads up @stolksdorf!)
Though this is obviously something that @github is doing intentionally to avoid people serving framed github pages, in this particular instance it appears to break the websites of anyone who is using github-buttons in their blog or project site, etc, and hasn't yet updated the URL to refer to ghbtns.com. I'm not sure if the solution here is more evangelism about the URL change, or putting up the old GH pages again, or something else, but I just figured I'd drop in to let you know that at the moment, there are some really averse affects for anyone who uses the project and hasn't updated in the last month.
I have only tried this with the follow button. This happens on both Windows 8.1 and Ubuntu 14.04 machines with the latest version of Chrome.
When I have the mouse over the button, and slowly move it away on the top side, the button remains highlighted blue, even after the mouse is no longer over it. This does not happen when moving the mouse off in any other direction.
github-follow
A dynamic github follow button implementation. Could be used here.
This is an urgent message to everyone! Github-Buttons is currently broken, and is impairing many sites involving them, including impress.js, many sites that I maintain, and more!
Visit http://bartaz.github.com/impress.js to see the horrendous mess. The gh-pages branch was deleted. Thus, github-buttons has broken tons of sites.
Please fix this immediately!
It would be awesome if there was a button for a user's GitHub Followers.
It would function just like the Repo's Watchers button.
Please change width="160px"
to width="160"
in <iframe>
.
Please display &repo=bootstrap
instead of &repo=bootstrap
.
https://validator.w3.org/nu/?doc=https%3A%2F%2Fghbtns.com%2F
Please consider not suggesting non-HTML5 iframe attributes.
Thank you!
Hi there fellow Hubber. If you're seeing this, that means that your site's custom domain is pointed to a deprecated IP. π
The good news is that it's an easy fix. Simply follow these instructions for updating your site's DNS records. π
β€οΈ and automation,
β The @github/pages team
I'm not sure of the implications of this style of iframe button but tons of people ask for a standard Sign in with GitHub button for building quick API applications.
Would a button like that make sense as part of this project?
...since things don't work nice with IE < 9.
I've noticed that the following URL will be requested:
https://api.github.com/repos//?callback=callback
The double slash seems to be unnecessary.
For example, this works:
http://ghbtns.com/github-btn.html?user=TooTallNate&type=watch&count=true&size=large&repo=node-lame
But, this does not work, and outputs "undefined" for the watcher count.
http://ghbtns.com/github-btn.html?user=TooTallNate&type=watch&count=true&size=large&repo=mpg123.js
Probably some kind of encoding/escaping issueβ¦
Buttons opened in Firefox (tested in 26.0) occasionally point back to this repository regardless of how they're configured.
Inspecting the same HTML document across Chrome and Firefox reveals that the script's source in the head
tag of the iframe
is pointing back to the author in Firefox but not in Chrome:
<iframe src="http://ghbtns.com/github-btn.html?user=rails&repo=rails&type=watch" allowtransparency="true" frameborder="0" height="20" scrolling="0" width="62">
#document
<html>
<head>
<script src="https://api.github.com/users/mdo?callback=callback"></script>
</head>
<body>...</body>
</html>
</iframe>
Any ideas?
I can't use iframe in my https website since these iframes are in HTML. Can you please get a free SSL cert from http://startssl.com or pay 20$ month and get a SSL behind cloudflare? That should be easier.
In HTML5 ampersands must be escaped via entity &
inside attributes: http://stackoverflow.com/questions/3705591/do-i-encode-ampersands-in-a-href
Is the current state a design choice to make it look nicer, or can I make a PR correcting the readme examples / templates?
Dear friend,
https://ghbtns.com/github-btn.html?user=acbarbosa1964&repo=acb-bootstrap-snippets&type=watch&count=true (results 53 should be 12)
and
https://ghbtns.com/github-btn.html?user=acbarbosa1964&repo=acb-bootstrap-snippets&type=star&count=true (is 53 - correct)
Both result same result.
Best regards,
Prevent another request, instantify image display.
Thanks for sharing this brilliant and popular set of buttons!
Now that watching and starring are separate things, would you consider implementing a similar button for "star repo", with optional data count, etc?
Cheers,
When trying to acces a site including your buttons (like this one http://addyosmani.github.com/backbone-fundamentals/) i've got this alert:
Validator says:
The allowtransparency attribute on the iframe element is obsolete. Use CSS instead.
Shall I correct the README examples / templates to use inline:
style="background-color: transparent;"
instead?
Same for frameborder
and scrolling
.
Ah, there is no widely supported alternative to scrolling
yet: http://stackoverflow.com/questions/15494568/html-iframe-disable-scroll
Recently the counts aren't being displayed for the fork and star buttons. For example,
http://ghbtns.com/github-btn.html?user=markdotto&repo=github-buttons&type=watch&count=true
doesn't show the count anymore
When I add the three buttons into my website. They automatically go far apart.
Is it possible to get them to go closer together?
Thanks,
@willtheorangeguy
Hey there, having trouble making
http://markdotto.github.com/github-buttons/github-btn.html?user=thomasdavis&repo=backboneboilerplate&type=watch
display watcher count, seems not be loading it.
Thanks for the great code!
Not an issue but simple question: Is there an official button? I think it would be great to include the answer in README just so users knows.
I've looked quite a bit but can't find any link for official button. This is ever more surprising for site that advertises itself for "social coding".
OSX 10.8.2, Chrome 26.0.1410.43
Unsafe JavaScript attempt to access frame with URL http://verifyjs.com/
from frame with URL http://ghbtns.com/github-btn.html?user=jpillora&type=follow.
Domains, protocols and ports must match.
This would be in line with the new github terminology, I think.
It would be great if there was more control as to where the buttons linked to. For example, it would be great to link the "watch" buttons to https://github.com/user/repo/subscription rather than just https://github.com/user/repo
Could we get a Fork button, with it linking to the repo itself? So, button says Fork
, link goes to /Owner/project-1
instead of /Owner/project-1/fork
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.