-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.html
45 lines (45 loc) · 8.13 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
<!doctype html>
<html>
<head>
<title>Favicon Test</title>
<link rel="icon" type="icon/x-image" href="https://api.byi.pw/favicon/?url=http://www.google.com" />
<script type="text/javascript" src="https://unpkg.com/favicon.js/dist/favicon.min.js"></script>
<script type="text/javascript">
var getFaviconApi = "https://api.byi.pw/favicon/?url=";
window.onload = function() {
var change = document.getElementById("change");
var animate = document.getElementById("animate");
var animate2 = document.getElementById("animate2");
var stopAnimate = document.getElementById("stopAnimate");
change.onclick = function() {
favicon.change(getFaviconApi + "http://en.wikipedia.org", "Wikipedia, the free encyclopedia");
};
animate.onclick = function() {
favicon.animate([
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQ8YIQwbLgQeNxMXMBMeMh0XOR4fMQ0gPhUiNRUnOyMcOyEpLCEvMCQ+PTgzMAIpSgYqTgcnUAAuWgUuXAorVAsuVAgvVg4rUw0qVwwtUAwvWQ4yTAYzVAEwXgAwXwEyXQAyXgA1WwM0XAE0XwE3XQI3XwcwXgY1XwA4XgoxWgswXAk2Xw4xWQ04WxMpQRUpRBMoVxEtVRUrVBUtWREyXRc5VQAvYAAvYQAsZwAuZwAxYAAwYQExYgAwYwIyYAAyYQAyYwAwZQAxZgEzZAAyZQAyZwE0YQE0YgA0YwE2YwA1ZAI0ZQA0ZgE0ZwA3ZAA3ZQA2ZwQwYQYyYwQyZAUzZQY1YQQ0YgY0Zgc2ZAQ3ZgIxaQAxagEzaAAyaQAyawAzbAAybgA0aAA0aQA1awE2aAI3aQA3agM0bgE2bAE3bQA2bwQwbwc3aAQ3bAU2bgA5YwQ4YAU4ZwU6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AADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjVJivzgAAABG0lEQVQoUwEQAe/+AHF3IVtvcHJaJyNjZGVpUF4AYE92JGdnTi4rMhwzZhl8TwBifk8sRT84Nzs6Q0QVfRdZAF9HczQ9p6aio6OkpYwteCQAg29TQpfayNnF1tfbvgURKQBBHjU5nNPO0cmvs8exhkYgAAkLhwGb3M3Mw7CynqC/iS8AlJGSkJrEz9CtwLm8urioNgC2t8K1n9XLyq7BnbuhmL08AKyrtJMK1NLYxqqplZaZiD4Aj42OiosIAg0MAAYDBwRAHwBMhUsaMBITHRsxDg8QFIBWAIJKSHRnFoFrfBh5KGpfTlwAbnt6VmyESVdxTV9fcVVhXABYIlBVbVJ1bV13UVUXWWFiACUqVGBoSXVSUGFXVn8mTXr3Hmu6vgXxNAAAAABJRU5ErkJggg=="
], 500);
};
animate2.onclick = function() {
favicon.animate([
getFaviconApi + "https://www.github.com",
getFaviconApi + "https://www.wikipedia.org",
getFaviconApi + "https://www.reddit.com",
getFaviconApi + "https://www.google.com"
], 200);
}
stopAnimate.onclick = function() {
favicon.stopAnimate();
};
};
</script>
</head>
<body>
<a id="change" href="#">Change favicon w/ title</a><br />
<a id="animate" href="#">Animate favicon</a><br />
<a id="animate2" href="#">Animate favicon (external icons)</a><br />
<a id="stopAnimate" href="#">Stop animation</a>
</body>
</html>