Skip to content

wizardsdevMaximK/chrome-badge-animator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrome Badge Animator

JavaScript class to be used in Chrome extensions that want to animate the text on the extension badge.

What is it?

This class will animate the text of your extension's badge. Think LED displays on train stations:

LED displays

This is how it will actually look in Chrome:

Chrome Badge Animator

How to use it?

You can look at the example extension in sampleext. You have to include the src/BadgeAnimator.js file in your extension (either in the manifest file or directly in the code somewhere). Once you've done that you can use it like this:

// all parameters, apart from `text`, are optional
var animator = new BadgeTextAnimator( {
	text: 'this is some sample text', // text to be scrolled (or animated)
	interval: 200, // the "speed" of the scrolling
	repeat: false, // repeat the animation or not
	size: 6 // size of the badge
} );

animator.animate();

// call `animator.stop();` to stop the animation

License

Licensed under MIT. See LICENSE.md file for details.

About

A simple class to animate chrome extensions badge text

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.2%
  • HTML 2.8%