a
This commit is contained in:
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
24
favicon.js
Normal file
24
favicon.js
Normal 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
BIN
favicon2.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user