From 2dc08e6bf263fdbdd0eedb848f6ad47235b50b38 Mon Sep 17 00:00:00 2001 From: Nirzara Ghure <113231114+nirzaraghure@users.noreply.github.com> Date: Wed, 4 Feb 2026 19:57:37 +0530 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A4=96=20GitGenius:=20AI-generated=20?= =?UTF-8?q?code=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index ddd467b..656bdbb 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,34 @@

GitHub Profile Viewer

From 8148d4d2715d7743f7f59de0649fdd8e81c74932 Mon Sep 17 00:00:00 2001 From: Nirzara Ghure <113231114+nirzaraghure@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:16:31 +0530 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A4=96=20AppGenius:=20AI-generated=20?= =?UTF-8?q?code=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/index.html b/index.html index 656bdbb..c874f9b 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,3 @@ -```html @@ -17,37 +16,10 @@

GitHub Profile Viewer

-``` \ No newline at end of file From 02369e1d3933b2639acd6cc62264d7fe1e7aaf48 Mon Sep 17 00:00:00 2001 From: Nirzara Ghure <113231114+nirzaraghure@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:18:26 +0530 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A4=96=20AppGenius:=20AI-generated=20?= =?UTF-8?q?code=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index c874f9b..80206ff 100644 --- a/index.html +++ b/index.html @@ -15,11 +15,12 @@

GitHub Profile Viewer

- + + From e53c3609d3f2f8bd57fd0d597c293276024f369e Mon Sep 17 00:00:00 2001 From: Nirzara Ghure <113231114+nirzaraghure@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:20:46 +0530 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A4=96=20AppGenius:=20AI-generated=20?= =?UTF-8?q?code=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/index.html b/index.html index 80206ff..caf05b3 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,38 @@

GitHub Profile Viewer

+ @@ -23,4 +55,40 @@

GitHub Profile Viewer

const searchBtn = document.getElementById('search-btn'); searchBtn.addEventListener('click', getProfile); }); + + function getProfile() { + const username = document.getElementById('username').value.trim(); + if (username) { + const profileDiv = document.getElementById('profile'); + profileDiv.innerHTML = ''; + const xhr = new XMLHttpRequest(); + xhr.onload = function() { + if (xhr.status >= 200 && xhr.status < 300) { + const profileData = JSON.parse(xhr.responseText); + renderProfile(profileData); + } else { + profileDiv.innerHTML = `Error: ${xhr.statusText}`; + } + }; + xhr.onerror = function() { + profileDiv.innerHTML = 'Error: Network request failed'; + }; + xhr.open('GET', `https://api.github.com/users/${username}`, true); + xhr.send(); + } else { + alert('Please enter a GitHub username'); + } + } + + function renderProfile(profileData) { + const profileDiv = document.getElementById('profile'); + const profileHTML = ` +

${profileData.name || profileData.login}

+

Username: ${profileData.login}

+

Profile URL: ${profileData.html_url}

+

Email: ${profileData.email}

+

Bio: ${profileData.bio || ''}

+ `; + profileDiv.innerHTML = profileHTML; + }