Skip to content

BR4VE/changeIcon.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to changeIcon.js

changeIcon.js is a small favicon and title changer library that uses event emitters


Documentation

Basic Usage

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

Other functions

changeIcon.onAnotherTab(title,source)

Changes the icon and title when user switches to another page

changeIcon.onAnotherTab("Noooo!" ,"crying.ico");

changeIcon.onThisTab(callback)

Executes the callback when user turns to the page

changeIcon.addAction("initial","WelcomeBack!","smiling.ico");

changeIcon.onThisTab(() => {
	changeIcon.emitAction("initial");
});

changeIcon.emitAction("original")

That one is a special emitter that turns the title and the icon to their original state

License / Credits

changeIcon.js is released under the MIT license.

About

ChangeIcon.js is a small favicon and title changer library that uses event emitters

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published