Skip to content

Commit c79c3db

Browse files
committed
Update userpage
1 parent 8d5f519 commit c79c3db

File tree

1 file changed

+4
-54
lines changed

1 file changed

+4
-54
lines changed

src/userpage.html

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,6 @@
2525
body { background: #111; color: #eee; }
2626
a { color: #4af; }
2727
}
28-
.label {
29-
font-weight: bold;
30-
}
31-
.freeform {
32-
white-space: pre-wrap;
33-
}
34-
.freeform:empty::after {
35-
content: '(empty)';
36-
font-style: italic;
37-
}
38-
.avatar {
39-
display: block;
40-
width: 128px;
41-
height: 128px;
42-
margin: 12px 0;
43-
}
4428
</style>
4529
</head>
4630
<body>
@@ -49,50 +33,16 @@ <h1>User Pages Not Supported</h1>
4933
</header>
5034
<main>
5135
<p>TurboWarp is for viewing projects. You can view users on <a href="https://scratch.mit.edu/" class="scratch-link">the Scratch website</a> instead.</p>
52-
<p>If you're trying to find a user's unshared projects or view the projects of deleted users, that was never the intended primary use of TurboWarp, the Scratch API doesn't tell us, we don't track it either, and the Scratch Team is fixing the root bug anyways.</p>
36+
<p>If you're trying to find a user's unshared projects or view the projects of deleted users, this has not been possible for years.</p>
5337
<p>Questions and concerns can be sent to <a href="https://scratch.mit.edu/users/GarboMuffin/#comments">the usual place</a>.</p>
54-
<div class="user-info-available" hidden>
55-
<p>The following is everything the Scratch API will tell us about this user:</p>
56-
<p class="label">About me:</p>
57-
<p class="freeform about"></p>
58-
<p class="label">What I'm working on:</p>
59-
<p class="freeform wiwo"></p>
60-
<p><span class="label">Country:</span> <span class="country"></span></p>
61-
<p><span class="label">Account created:</span> <span class="joined"></span></p>
62-
<p><span class="label">User ID:</span> <span class="id"></span></p>
63-
<p class="label">Avatar:</p>
64-
<img class="avatar">
65-
</div>
66-
<div class="user-info-unavailable" hidden>
67-
<p>We tried to find data about this user from the Scratch API, but couldn't find anything.</p>
68-
</div>
6938
<script>
7039
(function() {
7140
'use strict';
7241
var user = location.pathname.split('/')[2];
7342
var link = document.querySelector('.scratch-link');
74-
if (!user) return;
75-
link.href = 'https://scratch.mit.edu/users/' + user;
76-
/*
77-
var xhr = new XMLHttpRequest();
78-
xhr.responseType = 'json';
79-
xhr.onload = function () {
80-
if (xhr.status === 200) {
81-
var data = xhr.response;
82-
document.querySelector('.user-info-available').hidden = false;
83-
document.querySelector('.id').textContent = data.id;
84-
document.querySelector('.about').textContent = data.profile.bio;
85-
document.querySelector('.wiwo').textContent = data.profile.status;
86-
document.querySelector('.country').textContent = data.profile.country;
87-
document.querySelector('.joined').textContent = new Date(data.history.joined).toUTCString();
88-
document.querySelector('.avatar').src = 'https://trampoline.turbowarp.org/avatars/' + data.id;
89-
} else {
90-
document.querySelector('.user-info-unavailable').hidden = false;
91-
}
92-
};
93-
xhr.open('GET', 'https://trampoline.turbowarp.org/proxy/users/' + user);
94-
xhr.send();
95-
*/
43+
if (user) {
44+
link.href = 'https://scratch.mit.edu/users/' + user;
45+
}
9646
}());
9747
</script>
9848
</main>

0 commit comments

Comments
 (0)