forked from Hardmath123/hardmath123.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfollower.html
More file actions
33 lines (26 loc) · 700 Bytes
/
follower.html
File metadata and controls
33 lines (26 loc) · 700 Bytes
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
<html>
<head>
<script type="text/javascript" src='http://code.jquery.com/jquery-latest.min.js'></script>
<script>
var username = prompt("Username?");
var page=1;
function load( e ) {
$.get( "http://scratch.mit.edu/users/" + username + "/followers/?page=1", loaded );
}
function loaded( data ) {
var $dom = $( data );
var $users = $dom.find('span.title').children();
var $out = $('#result');
for (var i=0; i<$users.length; i++) {
var user = $users[i].text.trim();
$out.prepend( user+'<br>' );
}
page++;
$.get( "http://scratch.mit.edu/users/" + username + "/followers/?page="+page, loaded );
};
</script>
</head>
<body onload="load(event);">
<div id='result'></div>
</body>
</html>