Loading repository data…
Loading repository data…
BR4VE / repository
ChangeIcon.js is a small favicon and title changer library that uses event emitters
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
changeIcon.js is a small favicon and title changer library that uses event emitters
changeIcon.addAction("initial" ,"Welcome!" ,"favicon.ico");
// Emit the action anytime you want
changeIcon.emitAction("initial");
You can emit "added actions" as much as you want
Changes the icon and title when user switches to another page
changeIcon.onAnotherTab("Noooo!" ,"crying.ico");
Executes the callback when user turns to the page
changeIcon.addAction("initial","WelcomeBack!","smiling.ico");
changeIcon.onThisTab(() => {
changeIcon.emitAction("initial");
});
That one is a special emitter that turns the title and the icon to their original state
changeIcon.js is released under the MIT license.