Repository navigation
Expand file tree
/
Copy pathupgrade.html
More file actions
67 lines (64 loc) · 2.03 KB
/
Copy pathupgrade.html
File metadata and controls
67 lines (64 loc) · 2.03 KB
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
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="600">
<title>Форум недоступен</title>
<style>
body {
background: #eee;
}
.center {
display: flex;
justify-content: center;
}
.container {
background: #bbb;
max-width: 1280px;
padding: 50px 50px 30px 50px;
margin-top: 50px;
}
.title {
padding-top: 20px;
}
h1, h2, p {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
}
</style>
</head>
<body>
<div class="center">
<div class="container">
<div class="center">
<iframe src="https://www.youtube.com/embed/htWM5ZtONU4?autoplay=1&mute=1" width="800" height="450" frameborder="0" allowfullscreen></iframe>
</div>
<h1 class="title">Форум обновляется/перезагружается.</h1>
<h2>Зайдите через 5-10 минут.</h2>
<div class="center">
<img id="catImg">
</div>
</div>
</div>
<script>
function ajaxGet(url, callback) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
try {
var data = JSON.parse(xmlhttp.responseText);
callback(data);
} catch (err) {
console.log(err.message + ' ' + xmlhttp.responseText);
}
}
};
xmlhttp.open("GET", url, true);
xmlhttp.setRequestHeader('x-api-key', 'PUT_API_KEY_HERE_TO_GET_MORE_CATS');
xmlhttp.send();
}
ajaxGet('https://api.thecatapi.com/v1/images/search?size=full', function(data) {
document.getElementById('catImg').src = data[0]["url"] ;
});
</script>
</body>
</html>