Closed ghost closed 2 years ago
Is it possible to make an iframe dynamically size to fit content?
Alternatively, could use an SVG from Shields.io to avoid the iframe completely. They can dynamically generate buttons from an API lookup on their backend, based on URL parameters, like this:
https://img.shields.io/github/stars/gkz/LiveScript?style=social
Principle of least privilege and all that.
the reason it uses iframe currently is b/c its "serverless" – request is made by a js-script to github api at the moment of loading
i'd rather ask about the entire point of having dynamic counter in the first place, past 2k stars it doesnt really matter, can just get the number on each release as a ci/cd step
current:![current_20220101143418](https://user-images.githubusercontent.com/59403389/147852907-ed5f6569-8f46-45a8-b4f3-a1c8d8775dff.png)
fixed:![should_20220101143142](https://user-images.githubusercontent.com/59403389/147852868-f74a2469-a9db-4043-a416-092818190080.png)