-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta.js
More file actions
15 lines (15 loc) · 741 Bytes
/
meta.js
File metadata and controls
15 lines (15 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Fetch the PolyExtended user's avatar from GitHub API
fetch('https://api.github.com/users/PolyExtended')
.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);
});