Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janhancic/chrome-badge-animator
A simple class to animate chrome extensions badge text
https://github.com/janhancic/chrome-badge-animator
Last synced: 2 months ago
JSON representation
A simple class to animate chrome extensions badge text
- Host: GitHub
- URL: https://github.com/janhancic/chrome-badge-animator
- Owner: janhancic
- License: mit
- Created: 2010-09-22T13:52:39.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T10:48:02.000Z (almost 6 years ago)
- Last Synced: 2024-08-02T05:16:25.560Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 661 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](http://hancic.info/wp-content/uploads/2009/12/indoor-led-scrolling-signs.jpg "LED displays")
This is how it will actually look in Chrome:
![Chrome Badge Animator](https://raw.github.com/janhancic/chrome-badge-animator/master/misc/badge_animation.gif "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:```javascript
// 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](https://github.com/janhancic/chrome-badge-animator/blob/master/LICENSE.md) file for details.