idmillington/undum — pull request #14 by selene (2013-01-06 19:20:44+00:00)
Title: Fixes for localStorage detection and handling

- When checking for localStorage, hasLocalStorage is called as a function, not tested as a variable. (Fixes browsers always thinking localStorage is available.)
- Save/load button display is selected as a CSS class, not an ID. (Fixes localStorage always looking available.)
- hasLocalStorage() checks for window.localStorage === undefined as well as null. (Fixes detection on IE8 and probably others.)
- hasLocalStorage() wraps detection in a try-catch block. (Fixes detection in Firefox when "Accept Cookies" is set to "Always Ask", which throws an exception on accessing localStorage.)