kopia lustrzana https://github.com/badgen/badgen.net
docs: add "only=npm" query to index for debugging
rodzic
dbf4f4d839
commit
3c53d69d64
|
@ -213,8 +213,12 @@ Made with ❤️ by [Amio](https://github.com/amio)
|
|||
`)}</div>
|
||||
`
|
||||
|
||||
// use "?only=npm" to show only "npm" badge examples
|
||||
const only = window.liveBadges[new URL(window.location).searchParams.get('only')]
|
||||
const badges = only ? { [only]: window.liveBadges[only] } : window.liveBadges
|
||||
|
||||
render(
|
||||
genExamples(window.liveBadges),
|
||||
genExamples(badges),
|
||||
document.querySelector('#live-badge-examples')
|
||||
)
|
||||
</script>
|
||||
|
|
Ładowanie…
Reference in New Issue