Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
hcr5 authored Feb 17, 2024
1 parent ca42cba commit 0388e01
Showing 1 changed file with 52 additions and 3 deletions.
55 changes: 52 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}

#container {
width: 400px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

input[type="text"],
button {
padding: 10px;
margin-bottom: 10px;
width: calc(100% - 20px);
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}

button {
background-color: #4CAF50;
color: white;
cursor: pointer;
}

button:hover {
background-color: #45a049;
}

#result {
margin-top: 20px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
background-color: #f9f9f9;
}
</style>
<script>
function fetchFollowers() {
var username = document.getElementById("username").value.trim();
Expand All @@ -11,6 +56,7 @@

var page = 1;
var resultDiv = document.getElementById('result');
resultDiv.innerHTML = ''; // Clear previous results

function load() {
fetch("https://cors-anywhere.herokuapp.com/http://scratch.mit.edu/users/" + username + "/followers/?page=" + page)
Expand All @@ -36,8 +82,11 @@
</script>
</head>
<body>
<input type="text" id="username" placeholder="Enter username">
<button onclick="fetchFollowers()">Fetch Followers</button>
<div id='result'></div>
<div id="container">
<h2 style="text-align: center;">Fetch Followers</h2>
<input type="text" id="username" placeholder="Enter username">
<button onclick="fetchFollowers()">Fetch Followers</button>
<div id='result'></div>
</div>
</body>
</html>

0 comments on commit 0388e01

Please sign in to comment.