SiteCrafting, Inc.

16 Apr
Man Scroll Bookmarklet

Man Scroll Bookmarklet

Happy Friday! For all you Unix lovers out there, we have a treat. Do you miss the days of "more" and "man"? Do you often miss the pleasure of knowing right where you are at in a document? Introducing the Man Scroll bookmarklet!



The Man Scroll bookmarklet adds a black bar to the bottom left of your screen, just as the man pages of old used to do. You can now visually see how far you've scrolled down a page.

ManScroll
(function(m, a, n, s, c, r, o, l) {

  c = a.body;
  c.innerHTML += s;
  r = c.lastChild;

  (o = function() {
    l = parseInt(
      (
        (m.innerHeight || r.offsetTop) +
        (m.pageYOffset || a.documentElement.scrollTop)
      ) / c.scrollHeight * 100
    );
    r.innerHTML = l < 100 ? '--More--('+l+'%)' : 'END';
    setTimeout(o, n);
  })(); 
})(window, document, 99, '
  <div style=\'
    position: fixed;
    bottom: 0;
    left: 0;
    background: #000;
    color: #fff;
    font: bold 16px courier;
    width: 150px;
    text-align: center;
    z-index: 1000000;
  \'/>
');
Granted, this isn't really useful. But hey, it's Friday, enjoy it!
Free Gear, From the Workbench, Javascript
by Paul Sayre | 4/16/2010 4:35pm | Comments (0)

No comments found.


Leave a Comment




* required    Comment Guidelines