@@ -13,6 +13,7 @@ var LocalStorage = function () {
}
return {
+
getKey: function ( key ) {
return storage[ key ];
@@ -27,6 +28,12 @@ var LocalStorage = function () {
console.log( '[' + /\d\d\:\d\d\:\d\d/.exec( new Date() )[ 0 ] + ']', 'Saved state to LocalStorage.' );
+ },
+ clear: function () {
+ delete localStorage[ name ];
@@ -28,11 +28,7 @@ Menubar.File = function ( editor ) {
if ( confirm( 'Are you sure?' ) ) {
- if ( localStorage.threejsEditor !== undefined ) {
-
- delete localStorage.threejsEditor;
- }
+ editor.localStorage.clear();
location.href = location.pathname;