-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (66 loc) · 2.42 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Manrope:[email protected]&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Manish Phartiyal</title>
</head>
<body>
<div id="root"></div>
<script>
document.addEventListener('visibilitychange', function() {
if (document.hidden) {
document.title = 'Hello!';
} else {
document.title = 'Manish Phartiyal';
}
});
</script>
<script>
setTimeout(() => {
var favicon_video_image_counter = 0;
var favicon_video_icon_tag = document.querySelector("link[rel='icon']");
var favicon_video_images = [
"https://favicongenerator.s3.amazonaws.com/617519ea43df6.png","https://favicongenerator.s3.amazonaws.com/4ccf4e084c779.png"];
async function favicon_video_to_data_url(url, callback) {
var xhr = new XMLHttpRequest();
xhr.onload = function () {
var reader = new FileReader();
reader.onloadend = function () {
callback(reader.result);
};
reader.readAsDataURL(xhr.response);
};
xhr.open("GET", url);
xhr.responseType = "blob";
xhr.send();
}
var favicon_video_loaded_images = [];
favicon_video_images.map((url, idx) => {
favicon_video_to_data_url(url, function (dataUrl) {
favicon_video_loaded_images[idx] = dataUrl;
});
});
setInterval(function () {
if(favicon_video_loaded_images[favicon_video_image_counter]) {
favicon_video_icon_tag.href = favicon_video_loaded_images[
favicon_video_image_counter
].replace("application/octet-stream", "image/png");
}
if (
favicon_video_image_counter ==
favicon_video_loaded_images.length - 1
)
favicon_video_image_counter = 0;
else favicon_video_image_counter++;
}, 1000);
}, 2000);
</script>
<script defer src="https://kit.fontawesome.com/1c2c2462bf.js" crossorigin="anonymous"></script>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>