https://github.com/jlw-7/github-nonfollowers-checker
A fun tool to check who's not following you back on github (and perhaps unfollow them π)
https://github.com/jlw-7/github-nonfollowers-checker
developer-console github-api javascript
Last synced: about 1 year ago
JSON representation
A fun tool to check who's not following you back on github (and perhaps unfollow them π)
- Host: GitHub
- URL: https://github.com/jlw-7/github-nonfollowers-checker
- Owner: JLW-7
- License: gpl-3.0
- Created: 2025-05-06T09:14:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-06T09:24:10.000Z (about 1 year ago)
- Last Synced: 2025-05-06T10:33:30.178Z (about 1 year ago)
- Topics: developer-console, github-api, javascript
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π GitHub Non-Followers Checker
A simple, client-side tool that helps you identify which GitHub users you follow that don't follow you back. (I know, sometimes you would want to unfollow those who don't follow you back π)
---
### π How to Use
1. Open your browser's **Developer Console**:
* Windows: `Ctrl + Shift + J`
* Mac: `Cmd + Option + I`
2. Paste the full JavaScript code below and hit **Enter**. (Or you can click [here](checker.js) for the code):
``` javascript
"use strict";
const GITHUB_API_URL = "https://api.github.com/users/";
let nonFollowersList = [];
let isActiveProcess = false;
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function getAllFollowers(username) {
let followers = [];
let page = 1;
while (true) {
const response = await fetch(`${GITHUB_API_URL}${username}/followers?per_page=100&page=${page}`);
if (!response.ok) throw new Error('Error fetching followers: ' + response.statusText);
const data = await response.json();
if (data.length === 0) break;
followers = followers.concat(data);
page++;
}
return followers;
}
async function getAllFollowing(username) {
let following = [];
let page = 1;
while (true) {
const response = await fetch(`${GITHUB_API_URL}${username}/following?per_page=100&page=${page}`);
if (!response.ok) throw new Error('Error fetching following: ' + response.statusText);
const data = await response.json();
if (data.length === 0) break;
following = following.concat(data);
page++;
}
return following;
}
async function findNonFollowers(username) {
if (isActiveProcess) return;
isActiveProcess = true;
showLoading(true);
showError("");
try {
const followers = await getAllFollowers(username);
const following = await getAllFollowing(username);
const followerSet = new Set(followers.map(user => user.login));
nonFollowersList = following.filter(user => !followerSet.has(user.login));
renderResults(nonFollowersList);
} catch (error) {
console.error(error);
showError(error.message);
} finally {
isActiveProcess = false;
showLoading(false);
}
}
function renderResults(users) {
const container = document.querySelector(".results-container");
container.innerHTML = "";
if (users.length === 0) {
container.innerHTML = `
π Everyone follows you back!`;
} else {
users.forEach(user => {
const el = document.createElement("div");
el.className = "user";
el.innerHTML = `@${user.login}`;
container.appendChild(el);
});
}
document.querySelector(".nonfollower-count").textContent = `Non-followers: ${users.length}`;
}
function showLoading(show) {
document.querySelector(".loader").style.display = show ? "block" : "none";
}
function showError(msg) {
document.querySelector(".error-message").textContent = msg;
}
function renderOverlay(username) {
document.body.innerHTML = `
GitHub Non-Followers Checker
π Check Non-Followers
Loading...
Non-followers: 0
`;
document.getElementById("check-followers-btn").addEventListener("click", () => {
findNonFollowers(username);
});
}
function init() {
const username = prompt("Enter your GitHub username:");
if (username) {
renderOverlay(username);
} else {
alert("Username is required!");
}
}
init();
```
3. When prompted, enter your **GitHub username**.
4. Click **Check Non-Followers** in the interface that appears.
5. View the list of users who donβt follow you back.
6. Clicking on a user's name brings you directly to their profile. Then, you can unfollow them! (I mean if you want to)
___
### π Features
* β
Fetches **all followers** and **following** with GitHub API pagination.
* π Lists users you follow but who **donβt follow you back**.
* π Clickable GitHub profile links for each non-follower.
* β‘ Minimalistic, fast UI with no dependencies.
* π Runs **entirely in the browser** β no login, token, or backend needed.
---
### πΈ Preview

---
### β οΈ Disclaimer
> This project is not affiliated with, endorsed by, or connected to GitHub in any way. Use at your own discretion. It uses GitHub's public REST API without authentication, which is rate-limited (\~60 requests/hour).
---
### π€ Contributions
Feel free to open issues or pull requests to improve the tool.
---
### π License
GNU 3.0 License. See `LICENSE` file.