title-marquee.js
Scrolling text in your browser's title ♫ ♪
Install
npm install title-marquee
or clone this repo.
Usage
This plugin follows the CommonJS spec, so you can bundle and require it on the browser with browserify or the like.
<script>var tm = ; // Scroll text; // Scroll in reverse; // Scroll left and right; // Faster!!!!; // Or use engrish; // Other stufftm;tm;tm;tmtext'Change the title to this text right here'; </script>
Consecutive calls to title-marquee will replace the current title.
Default Options
buffer: 10 // # chars shown type: 'scroll' // 'scroll' | 'reverse' | 'bounce' speed: 'normal' // 'slow' | 'normal' | 'fast' | time in ms
API
tm(options)
Pass in an options hash or just a string to kick off the scrolling.
.pause()
Pauses that shit
.resume()
Resume the scrolling
.toggle()
Too lazy to care? Flip a switch.
.text(str)
Updates the text in place without resetting the scroll offset. This is great for making live updates. For example, frequently updated things like displaying currently playing song or the number of active users.
Manual Build
npm run build
License
MIT