trophy-place / community

Public repository for community additions to trophy.place
https://my.trophy.place
1 stars 0 forks source link

Consider cases where dynamically changing the favicon would be a fun addition #18

Open TheYuriG opened 1 year ago

TheYuriG commented 1 year ago

Consider the following script:

let link = document.querySelector("link[rel~='icon']");
if (!link) {
    link = document.createElement('link');
    link.rel = 'icon';
    document.head.appendChild(link);
}
link.href = 'https://stackoverflow.com/favicon.ico';

With this, you can change a favicon to anything if the ico file is reachable.

I don't know how we could use this, but it's a case to consider. Maybe change the icon based on the player has achieved something? Change dynamically when we change the title? How would this impact the navigation history? image Is it possible to implement this without making the user experience heinous?