This commit is contained in:
unknown
2018-11-07 21:22:35 +00:00
parent f83a276a76
commit ef3b7d5c0d
4 changed files with 25 additions and 0 deletions

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

24
favicon.js Normal file
View File

@@ -0,0 +1,24 @@
document.head = document.head || document.getElementsByTagName('head')[0];
function changeFavicon(src) {
var link = document.createElement('link'),
oldLink = document.getElementById('dynamic-favicon');
link.id = 'dynamic-favicon';
link.rel = 'shortcut icon';
link.href = src;
if (oldLink) {
document.head.removeChild(oldLink);
}
document.head.appendChild(link);
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
while (true) {
changeFavicon('/favicon.ico');
await sleep(2000);
changeFavicon('/favicon2.ico');
await sleep(2000);
}

BIN
favicon2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -7,6 +7,7 @@
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="openpgp.min.js"></script>
<script src="favicon.js"></script>
<script>
openpgp.initWorker({ path:'openpgp.worker.min.js' }) // set the relative web worker path