mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-13 22:32:26 +03:00
Fix multiple favicon changing request
This commit is contained in:
parent
584fa87bbd
commit
bdc10fb729
2 changed files with 16 additions and 10 deletions
|
@ -120,12 +120,7 @@ export function cssVar(name) {
|
|||
}
|
||||
|
||||
export function setFavicon(url) {
|
||||
const oldFav = document.querySelector('[rel=icon]');
|
||||
oldFav.parentElement.removeChild(oldFav);
|
||||
const fav = document.createElement('link');
|
||||
fav.rel = 'icon';
|
||||
fav.href = url;
|
||||
document.head.appendChild(fav);
|
||||
document.querySelector('[rel=icon]').href = url;
|
||||
}
|
||||
|
||||
export function copyToClipboard(text) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue