Skip to content

Commit

Permalink
Create meta.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bacon_Space authored Oct 7, 2023
1 parent a5c3178 commit 175e87f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Fetch the StreamStats user's avatar from GitHub API
fetch('https://api.github.com/users/StreamStats')
.then(response => response.json())
.then(data => {
// Extract the avatar URL from the API response
const avatarUrl = data.avatar_url;
const twitterImage = document.getElementById('twitter-image');
twitterImage.content = avatarUrl;
// Update the href attribute of the favicon link
const favicon = document.getElementById('favicon');
favicon.href = avatarUrl;
})
.catch(error => {
console.error('Error fetching avatar:', error);
});

0 comments on commit 175e87f

Please sign in to comment.