Last active
August 29, 2015 14:25
-
-
Save tranch/9b4d0f61be79b3b62dd3 to your computer and use it in GitHub Desktop.
scrolling document title when it longer than browser tab width.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (doc) { | |
| var origin_title = doc.title; | |
| setInterval(function() { | |
| doc.title = doc.title.length <= 15 | |
| ? origin_title | |
| : doc.title.slice(1, 1) + doc.title.slice(1, doc.title.length + 1); | |
| }, 300); | |
| })(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment