-
Notifications
You must be signed in to change notification settings - Fork 1
/
isl_pull.html
58 lines (53 loc) · 2.04 KB
/
isl_pull.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
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="jatloesmile-hd.png">
<title>ISL puller</title>
</head>
<body>
<p>V1.3, 1998-2021</p>
<p>Put one letter for the subject, you can leave boxes empty to search through all of that category</p>
<p>There is a known bug where nonexistent problems redirect to different problems</p> <br>
<input type="text" id="year" placeholder="Year" size="3">
<input type="text" id="subject" placeholder="Subject" size="3">
<input type="text" id="number" placeholder="Number" size="3">
<input type="button" value="Search" onclick="getProblems()">
<br> <br> <br>
<div id="outside"><div id="container"></div></div>
</body>
<script>
function makeImage(src) {
let img = document.createElement("img");
img.src = src;
img.width = "1000";
document.getElementById("container").appendChild(img);
document.getElementById("container").appendChild(document.createElement("br"));
}
function getProblems() {
document.getElementById("container").remove();
let newDiv = document.createElement("div");
newDiv.id = "container";
document.getElementById("outside").appendChild(newDiv);
let years = [];
for (let i = 1998; i <= 2021; i++) years.push(i);
if (document.getElementById("year").value != "") years = [document.getElementById("year").value];
let subjects = ["a","c","g","n"];
if (document.getElementById("subject").value != "") subjects = [document.getElementById("subject").value];
let numbers = [];
for (let i = 1; i <= 10; i++) numbers.push(i);
if (document.getElementById("number").value != "") numbers = [document.getElementById("number").value];
for (let i = 0; i < years.length; i++) {
for (let j = 0; j < subjects.length; j++) {
for (let k = 0; k < numbers.length; k++) {
makeImage("https://ggim.me/images/imo_shortlist/" + years[i] + "/" + subjects[j] + numbers[k]);
}
}
}
}
document.onkeyup = function(e) {
if (e.which == 13) {
getProblems();
}
};
</script>
</html>