From a16d47cbf717b5d204975eb311ff2eda266ca713 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Fri, 28 Oct 2011 17:12:28 -0700 Subject: [PATCH] Mother fucking localStorage. --- Atom/Classes/AtomApp.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Atom/Classes/AtomApp.m b/Atom/Classes/AtomApp.m index d5bd4b875..a8754b25d 100644 --- a/Atom/Classes/AtomApp.m +++ b/Atom/Classes/AtomApp.m @@ -38,6 +38,11 @@ // AppDelegate - (void)applicationWillFinishLaunching:(NSNotification *)aNotification { + // Hack to make localStorage work + WebPreferences* prefs = [WebPreferences standardPreferences]; + [prefs _setLocalStorageDatabasePath:@"~/.atomicity/storage"]; + [prefs setLocalStorageEnabled:YES]; + NSDictionary *defaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"WebKitDeveloperExtras", nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; }