-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
85 lines (79 loc) · 2.22 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Image Optimizer</title>
<style>
img {
width: 300px;
height: 300px;
object-fit: cover;
}
main {
width: 1216px;
margin: 0 auto;
}
</style>
</head>
<body>
<main>
<h1>Default behavior</h1>
<nav>
<a href="/">Default</a>
<a href="/dom">DOM</a>
<a href="/canvas">Canvas</a>
</nav>
<img src="assets/1.jpg" />
<img src="assets/2.jpg" />
<img src="assets/3.jpg" />
<img src="assets/4.jpg" />
<img src="assets/5.jpg" />
<img src="assets/6.jpg" />
<img src="assets/7.jpg" />
<img src="assets/8.jpg" />
<img src="assets/9.jpg" />
<img src="assets/10.jpg" />
<img src="assets/11.jpg" />
<img src="assets/12.jpg" />
<img src="assets/13.jpg" />
<img src="assets/14.jpg" />
<img src="assets/15.jpg" />
<img src="assets/16.jpg" />
<img src="assets/17.jpg" />
<img src="assets/18.jpg" />
<img src="assets/19.jpg" />
<img src="assets/20.jpg" />
<img src="assets/21.jpg" />
<img src="assets/22.jpg" />
<img src="assets/23.jpg" />
<img src="assets/24.jpg" />
<img src="assets/25.jpg" />
<img src="assets/26.jpg" />
<img src="assets/27.jpg" />
<img src="assets/28.jpg" />
<img src="assets/29.jpg" />
<img src="assets/30.jpg" />
<img src="assets/31.jpg" />
<img src="assets/32.jpg" />
<img src="assets/33.jpg" />
<img src="assets/34.jpg" />
<img src="assets/35.jpg" />
<img src="assets/36.jpg" />
<img src="assets/37.jpg" />
<img src="assets/38.jpg" />
<img src="assets/39.jpg" />
<img src="assets/40.jpg" />
</main>
<script>
if (location.port === "" && location.protocol === "https:") {
document
.querySelectorAll("a")
.forEach(
(link) => (link.href = "/img-optimizer" + link.getAttribute("href"))
);
}
</script>
</body>
</html>