"Embed Sponsor button" seems to be broken?

I’ve been trying to embed the iframe provided by GitHub into my website (https://www.deobald.ca) for a while now but I can’t seem to get it to render. Mysteriously, the iframe renders with a 0px height… though even when I turn that off in the inspector, it’s still not visible.

I’m not sure if this is a peculiarity of trying to render an iframe across domains, or some other security issue?

Has anyone else managed to get a Sponsor button embedded in an external website? I don’t see any topics on it yet.

Thanks!

PS: You will see a sponsor button on that webpage… but it’s just an image and a link. It’s not an iframe.

:wave: Hi, @deobald!

Excited that you’re interested in embedding a sponsor button on your website! Sorry to hear it didn’t work on your first try.

Could you share the iframe code you tried to use to embed a sponsor button? Could you also share what browser you’re using?

In Chrome DevTools, I was able to paste this code into the sidebar of your website, and it seemed to render OK.

<iframe src="https://github.com/sponsors/deobald/button" title="Sponsor deobald" height="35" width="107" style="border: 0;"></iframe>
1 Like

Hi @nholden! Sorry for the slow reply… despite the lockdown in India we just moved into a new house and we’ve been a bit …internet-less. Ha ha!

I was using the iframe code provided by the embed feature verbatim:

<iframe src="https://github.com/sponsors/deobald/button" title="Sponsor deobald" height="35" width="107" style="border: 0;"></iframe>

This looks to be identical to what you’ve pasted, so it would seem the iframe code isn’t the problem?

Okay, very strange. I tried this on Firefox 77 (MacOS and Linux) and Chromium 83 (Linux) and Chrome 83 (MacOS). It… only seems to be broken on Firefox 77 on MacOS? Which was the only browser I was trying, initially, since that’s where my website’s build is. All the other 3 browser/OS configurations render the button perfectly.

I’ve put the code back onto https://www.deobald.ca so you can have a look, if you’re interested. Firefox on MacOS renders it with a 0px height every time and I have no idea why. All the other browsers I have installed are fine.

Good luck, and thanks!

Thanks for sharing all those details, @deobald!

I just visited https://www.deobald.ca on Firefox 77 on MacOS, and the button seems to be working. Here’s what I see.

Do you have any browser extensions that could be blocking the iframe?

1 Like