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.
November 7th, 2009 at 7:10 am
Very cool. You could extend upon it and add date support for URLs (…/2009/11/06/…) like many blog addresses use.
November 11th, 2009 at 3:50 am
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.
November 11th, 2009 at 4:56 pm
That should be <br> nodes, of course…