Fun with DOMMouseScroll

I put together a demo of incrementing numbers in URLs by scrolling.

Hopefully it's not considered a bug that I can use rangeOffset for a text node "inside" a textbox ;) Trying to access rangeParent throws a security exception.

This could be used by an extension like URL Flipper as a shortcut for changing specific numbers in URLs.

3 Responses to “Fun with DOMMouseScroll”

  1. Seamus Says:

    Very cool. You could extend upon it and add date support for URLs (…/2009/11/06/…) like many blog addresses use.

  2. Neil Rashbrook Says:

    This might not be a problem in an extension, but rangeOffset breaks if your text box contains a newline, due to the way we currently create nodes.

  3. Neil Rashbrook Says:

    That should be <br> nodes, of course…