-
Notifications
You must be signed in to change notification settings - Fork 0
/
RobloxAccounts.html
264 lines (222 loc) · 10.2 KB
/
RobloxAccounts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DaintyDust</title>
<link rel="icon" href="assets/images/Profile Circle.png" type="image/jpg">
<link rel="stylesheet" href="assets/styles.css">
<style>
.roblox-account {
display: flex;
align-items: center;
margin-bottom: 10px;
background: #373434;
border-radius: 12px;
height: 100px;
padding-left: 25px;
padding-right: 25px;
}
.roblox-account img {
width: 65px;
height: 65px;
border-radius: 50%;
margin-right: 10px;
background: #222527;
}
.roblox-account .group-info {
margin-left: auto; /* Pushes group-info to the right */
display: flex;
align-items: center;
width: 650px; /* Adjust as necessary */
}
.group-info img {
margin-right: 10px;
width: 65px;
height: 65px;
border-radius: 12px;
}
.group-info span {
margin-right: 10px;
font-size: 16px; /* Adjust as necessary */
color: #ffffff; /* Adjust text color */
}
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #1a1a1a;
color: #ffffff;
overflow-x: hidden; /* Prevent horizontal scrollbar */
}
.section {
text-align: center;
}
.section-content {
max-width: 1500px;
margin: 0 auto;
}
.section-title {
font-size: 2rem;
color: #61dafb;
margin-bottom: 2rem;
}
#AccountsMainFrame {
display: block;
margin: 0 auto;
border: 2px solid #61dafb;
border-radius: 10px;
background-color: #0f0f0f;
padding: 1rem;
border-radius: 10px;
position: relative;
min-width: 1400px;
min-height: 600px;
}
</style>
</head>
<body>
<script src="assets/redirect.js"></script>
<header class="header">
<div class="header-content">
<div class="logo-container">
<img src="assets/images/Nick Studios Logo.png" alt="Nick Studios Logo" class="nick-studios-logo">
<h1 class="header-title">DaintyDust</h1>
</div>
<p class="header-description">My Roblox Accounts!</p>
</div>
<div class="social-icons">
<a href="https://twitter.com/NickV535"><img src="assets/images/Twitter Logo.png" alt="Twitter Logo" class="social-icon"></a>
<a href="https://youtube.com/@DaintyDust"><img src="assets/images/Youtube Logo.png" alt="Youtube" class="social-icon"></a>
<img src="assets/images/Discord Logo.png" alt="Discord Logo" class="social-icon" id="discord-icon">
<a href="https://github.com/DaintyDust"><img src="assets/images/Github Logo.png" alt="GitHub Logo" class="social-icon"></a>
<a href="https://www.roblox.com/users/544088422/profile"><img src="assets/images/Roblox Logo.png" alt="Roblox Logo" class="social-icon"></a>
<a href="https://www.roblox.com/groups/8193767/Nick-Studios#!/about"><img src="assets/images/Nick Studios Logo.png" alt="Nick Studios Logo" class="social-icon"></a>
</div>
</header>
<section id="Main" class="section">
<div class="section-content">
<h2 class="section-title">Roblox Accounts:</h2>
<div id="AccountsMainFrame" class="game-container">
<div id="robloxAccountsContainer"></div>
</div>
</div>
</section>
<script>
const robloxUserIDs = [544088422, 455544701, 524657251, 5073139088, 342197330, 547057686, 543343227, 523574085, 2420401490, 2717491346, 383005337, 3538200700, 3538209403];
const groupId = 8193767;
async function fetchRobloxUserData(userId) {
const response = await fetch(`https://users.roproxy.com/v1/users/${userId}`);
const data = await response.json();
return data;
}
async function fetchRobloxUserThumbnail(userId) {
const response = await fetch(`https://thumbnails.roproxy.com/v1/users/avatar-headshot?userIds=${userId}&size=150x150&format=Png&isCircular=true`);
const data = await response.json();
return data.data[0].imageUrl;
}
async function fetchGroupData(groupId) {
const response = await fetch(`https://groups.roproxy.com/v1/groups/${groupId}`);
const data = await response.json();
console.log(data);
return data;
}
async function fetchGroupIcon(groupId) {
const response = await fetch(`https://thumbnails.roproxy.com/v1/groups/icons?groupIds=${groupId}&size=150x150&format=Png`);
const data = await response.json();
return data.data[0].imageUrl;
}
async function fetchUserGroupRole(userId, groupId) {
const response = await fetch(`https://groups.roproxy.com/v1/users/${userId}/groups/roles`);
const data = await response.json();
const groupRole = data.data.find(group => group.group.id === groupId);
return groupRole ? groupRole.role.name : 'No Role';
}
async function fetchGroupVisits(groupId) {
let allData = [];
let nextPageCursor = null;
do {
const response = await fetch(`https://games.roproxy.com/v2/groups/${groupId}/games?accessFilter=2&sortOrder=Asc&limit=10&cursor=${nextPageCursor || ''}`);
const data = await response.json();
allData = allData.concat(data.data);
nextPageCursor = data.nextPageCursor;
} while (nextPageCursor);
console.log(allData);
let totalVisits = 0;
for (const game of allData) {
totalVisits += game.placeVisits;
}
console.log(`Total Visits: ${totalVisits}`);
return totalVisits;
}
async function displayRobloxAccounts() {
const container = document.getElementById('robloxAccountsContainer');
const groupData = await fetchGroupData(groupId);
const groupVisitsData = await fetchGroupVisits(groupId);
console.log(groupVisitsData);
const groupIconUrl = await fetchGroupIcon(groupId);
for (const userId of robloxUserIDs) {
const userData = await fetchRobloxUserData(userId);
const userThumbnail = await fetchRobloxUserThumbnail(userId);
const userRole = await fetchUserGroupRole(userId, groupId);
const accountDiv = document.createElement('div');
accountDiv.classList.add('roblox-account');
accountDiv.setAttribute('href', `https://www.roblox.com/users/${userId}/profile`);
accountDiv.setAttribute('target', "_blank");
const img = document.createElement('img');
img.src = userThumbnail;
img.alt = `${userData.displayName}'s Profile Picture`;
const textDiv = document.createElement('div');
textDiv.style.display = 'flex';
textDiv.style.flexDirection = 'column';
const displayName = document.createElement('span');
displayName.textContent = userData.displayName;
displayName.style.fontSize = '28px';
displayName.style.marginBottom = "3px";
const userName = document.createElement('span');
userName.textContent = `@${userData.name}`;
userName.style.textAlign = "left";
const groupInfoDiv = document.createElement('div');
groupInfoDiv.classList.add('group-info');
const groupInfoDiv2 = document.createElement('div');
groupInfoDiv2.style.display = 'flex';
groupInfoDiv2.style.flexDirection = 'column';
const groupInfoDiv3 = document.createElement('div');
const groupName = document.createElement('span');
groupName.textContent = `Group: ${groupData.name}`;
groupName.style.textAlign = "left";
groupName.style.marginBottom = "10px";
const groupMembers = document.createElement('span');
groupMembers.textContent = `Members: ${groupData.memberCount}`;
const groupRole = document.createElement('span');
groupRole.textContent = `Role: ${userRole}`;
const groupVisits = document.createElement('span');
groupVisits.textContent = `Visits: ${groupVisitsData}`;
const groupIcon = document.createElement('img');
groupIcon.src = groupIconUrl;
groupIcon.alt = `${groupData.name} Icon`;
groupIcon.style.width = '65px';
groupIcon.style.height = '65px';
groupIcon.style.borderRadius = '12px';
groupInfoDiv.appendChild(groupIcon);
groupInfoDiv2.appendChild(groupName);
groupInfoDiv3.appendChild(groupMembers);
groupInfoDiv3.appendChild(groupRole);
groupInfoDiv3.appendChild(groupVisits);
groupInfoDiv2.appendChild(groupInfoDiv3);
groupInfoDiv.appendChild(groupInfoDiv2)
textDiv.appendChild(displayName);
textDiv.appendChild(userName);
accountDiv.appendChild(img);
accountDiv.appendChild(textDiv);
accountDiv.appendChild(groupInfoDiv);
//accountDiv.addEventListener('click', () => {
// window.location.href = `https://www.roblox.com/users/${userId}/profile`;
//});
container.appendChild(accountDiv);
}
}
displayRobloxAccounts();
</script>
</body>
</html>