diff --git a/AtomWindowController.h b/AtomWindowController.h index 3a963f57b..245f923e6 100644 --- a/AtomWindowController.h +++ b/AtomWindowController.h @@ -8,7 +8,6 @@ #import - @interface AtomWindowController : NSWindowController { IBOutlet id webView; NSString *URL; diff --git a/AtomWindowController.m b/AtomWindowController.m index c11b9dd03..42e39aab5 100644 --- a/AtomWindowController.m +++ b/AtomWindowController.m @@ -26,7 +26,10 @@ [self setShouldCascadeWindows:NO]; [self setWindowFrameAutosaveName:@"atomWindow"]; - + + + [webView setFrameLoadDelegate:self]; + if (self.URL) { [webView setMainFrameURL:self.URL]; } else { @@ -36,10 +39,13 @@ NSString *html = [NSString stringWithContentsOfURL:indexURL encoding:NSUTF8StringEncoding error:nil];; [[webView mainFrame] loadHTMLString:html baseURL:htmlURL]; } - - // https://github.com/parmanoir/jscocoa#readme - JSCocoa* jsc = [[JSCocoa alloc] initWithGlobalContext:[[webView mainFrame] globalContext]]; - [jsc setObject:self withName:@"App"]; } +- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame { + // https://github.com/parmanoir/jscocoa#readme + JSCocoa* jsc = [[JSCocoa alloc] initWithGlobalContext:[frame globalContext]]; + [jsc setObject:self withName:@"App"]; +} + + @end diff --git a/Atomicity.xcodeproj/project.pbxproj b/Atomicity.xcodeproj/project.pbxproj index a086ef3ce..5baf63734 100644 --- a/Atomicity.xcodeproj/project.pbxproj +++ b/Atomicity.xcodeproj/project.pbxproj @@ -252,7 +252,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$PROJECT_DIR/script/compile.sh\""; + shellScript = "\"$PROJECT_DIR/script/compile.sh\" "; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/HTML/editor.html b/HTML/editor.html new file mode 100644 index 000000000..327c4bf69 --- /dev/null +++ b/HTML/editor.html @@ -0,0 +1,32 @@ + + + + + +
+ + + + + + + + + + + + + + diff --git a/HTML/index.html b/HTML/index.html index a29cbb600..a8773dc53 100644 --- a/HTML/index.html +++ b/HTML/index.html @@ -1,28 +1,8 @@ - -
- - - - - - - - - - - - - + + + + + + + + diff --git a/HTML/project.html b/HTML/project.html new file mode 100644 index 000000000..e69de29bb diff --git a/script/copy-html.sh b/script/copy-html.sh deleted file mode 100755 index b89ff42de..000000000 --- a/script/copy-html.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -SOURCE_SCRIPTS_DIR="$PROJECT_DIR/HTML" -DESTINATION_SCRIPTS_DIR="$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources/" - -cp -r "$SOURCE_SCRIPTS_DIR" "$DESTINATION_SCRIPTS_DIR" -echo "$DESTINATION_SCRIPTS_DIR"