A simple library for getting favicons from any site. Uses the Allorigins API to retrieve the site's HTML.
- Connect grabIcons.js to your project You can download it or use cdn
<script src="https://cdn.jsdelivr.net/gh/ghtx280/faviconGrabber@main/grabIcons.js"></script>
- Add the code below
grabIcons("https://example.com")
.then(icons => {
console.log(icons) // [icon1, icon2, icon3, ...]
})
If you have any problems or suggestions, write to me in telegram