Fix multiple favicon changing request

This commit is contained in:
Ajay Bura 2022-09-04 13:33:41 +05:30
parent 584fa87bbd
commit bdc10fb729
2 changed files with 16 additions and 10 deletions

View file

@ -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) {