<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,7 +23,7 @@
 		&lt;/object&gt;
 		&lt;object class=&quot;NSMutableArray&quot; key=&quot;IBDocument.EditedObjectIDs&quot;&gt;
 			&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-			&lt;integer value=&quot;7&quot;/&gt;
+			&lt;integer value=&quot;4&quot;/&gt;
 		&lt;/object&gt;
 		&lt;object class=&quot;NSArray&quot; key=&quot;IBDocument.PluginDependencies&quot;&gt;
 			&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
@@ -259,7 +259,7 @@
 												&lt;boolean value=&quot;NO&quot;/&gt;
 												&lt;boolean value=&quot;NO&quot;/&gt;
 												&lt;boolean value=&quot;NO&quot;/&gt;
-												&lt;boolean value=&quot;NO&quot;/&gt;
+												&lt;boolean value=&quot;YES&quot;/&gt;
 												&lt;boolean value=&quot;NO&quot;/&gt;
 												&lt;string&gt;Helvetica&lt;/string&gt;
 											&lt;/object&gt;
@@ -400,6 +400,14 @@
 					&lt;/object&gt;
 					&lt;int key=&quot;connectionID&quot;&gt;35&lt;/int&gt;
 				&lt;/object&gt;
+				&lt;object class=&quot;IBConnectionRecord&quot;&gt;
+					&lt;object class=&quot;IBOutletConnection&quot; key=&quot;connection&quot;&gt;
+						&lt;string key=&quot;label&quot;&gt;frameLoadDelegate&lt;/string&gt;
+						&lt;reference key=&quot;source&quot; ref=&quot;655178903&quot;/&gt;
+						&lt;reference key=&quot;destination&quot; ref=&quot;1001&quot;/&gt;
+					&lt;/object&gt;
+					&lt;int key=&quot;connectionID&quot;&gt;36&lt;/int&gt;
+				&lt;/object&gt;
 			&lt;/object&gt;
 			&lt;object class=&quot;IBMutableOrderedSet&quot; key=&quot;objectRecords&quot;&gt;
 				&lt;object class=&quot;NSArray&quot; key=&quot;orderedObjects&quot;&gt;
@@ -618,7 +626,7 @@
 				&lt;/object&gt;
 			&lt;/object&gt;
 			&lt;nil key=&quot;sourceID&quot;/&gt;
-			&lt;int key=&quot;maxID&quot;&gt;35&lt;/int&gt;
+			&lt;int key=&quot;maxID&quot;&gt;36&lt;/int&gt;
 		&lt;/object&gt;
 		&lt;object class=&quot;IBClassDescriber&quot; key=&quot;IBDocument.Classes&quot;&gt;
 			&lt;object class=&quot;NSMutableArray&quot; key=&quot;referencedPartialClassDescriptions&quot;&gt;</diff>
      <filename>SpeakerNotes.xib</filename>
    </modified>
    <modified>
      <diff>@@ -39,8 +39,7 @@
 - (void)windowDidLoad;
 {
     [super windowDidLoad];
-    
-    self.pageIndex = 0; // set the first media style and load the results
+    [[_webView mainFrame] loadData:_htmlData MIMEType:@&quot;text/html&quot; textEncodingName:@&quot;utf-8&quot; baseURL:nil];
 }
 
 - (void)setDocument:(NSDocument *)document;
@@ -63,16 +62,17 @@
 #pragma mark -
 #pragma mark KVC
 
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)webFrame;
+{
+    // show the first set of speaker notes once we are fully loaded.
+    self.pageIndex = 0;
+}
+
 @synthesize pageIndex = _pageIndex;
 - (void)setPageIndex:(NSUInteger)pageIndex;
 {
     _pageIndex = pageIndex;
-    //NSLog(@&quot;speaker pageIndex = %lu&quot;, pageIndex);
-    
-    // Horrifying but easy!
-    NSString *mediaStyle = [NSString stringWithFormat:@&quot;mBGSlide%lu&quot;, _pageIndex];
-    [_webView setMediaStyle:mediaStyle];
-    [[_webView mainFrame] loadData:_htmlData MIMEType:@&quot;text/html&quot; textEncodingName:@&quot;utf-8&quot; baseURL:nil];
+    [[_webView windowScriptObject] evaluateWebScript:[NSString stringWithFormat:@&quot;displayNotesForSlide(%lu);&quot;, pageIndex]];
 }
 
 #pragma mark -</diff>
      <filename>SpeakerNotesWindowController.m</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>blitz-example.key</filename>
    </modified>
    <modified>
      <diff>@@ -24,51 +24,32 @@
 			&lt;head&gt;
 				&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
 				
+				&lt;!-- default all the speaker notes to hidden and positioned atop each other --&gt;
 				&lt;style type=&quot;text/css&quot;&gt;
 					div.slide {
 						position:absolute;
 						display:none;
 					}
-					/* wow, this is terrible */
-					@media mBGSlide0 { #BGSlide0 { display: block; }}
-					@media mBGSlide1 { #BGSlide1 { display: block; }}
-					@media mBGSlide2 { #BGSlide2 { display: block; }}
-					@media mBGSlide3 { #BGSlide3 { display: block; }}
-					@media mBGSlide4 { #BGSlide4 { display: block; }}
-					@media mBGSlide5 { #BGSlide5 { display: block; }}
-					@media mBGSlide6 { #BGSlide6 { display: block; }}
-					@media mBGSlide7 { #BGSlide7 { display: block; }}
-					@media mBGSlide8 { #BGSlide8 { display: block; }}
-					@media mBGSlide9 { #BGSlide9 { display: block; }}
-					@media mBGSlide10 { #BGSlide10 { display: block; }}
-					@media mBGSlide11 { #BGSlide11 { display: block; }}
-					@media mBGSlide12 { #BGSlide12 { display: block; }}
-					@media mBGSlide13 { #BGSlide13 { display: block; }}
-					@media mBGSlide14 { #BGSlide14 { display: block; }}
-					@media mBGSlide15 { #BGSlide15 { display: block; }}
-					@media mBGSlide16 { #BGSlide16 { display: block; }}
-					@media mBGSlide17 { #BGSlide17 { display: block; }}
-					@media mBGSlide18 { #BGSlide18 { display: block; }}
-					@media mBGSlide19 { #BGSlide19 { display: block; }}
-					/* wolf said 20 slides dammit! */
-					@media mBGSlide20 { #BGSlide20 { display: block; }}
-					@media mBGSlide21 { #BGSlide21 { display: block; }}
-					@media mBGSlide22 { #BGSlide22 { display: block; }}
-					@media mBGSlide23 { #BGSlide23 { display: block; }}
-					@media mBGSlide24 { #BGSlide24 { display: block; }}
-					/* seriously, aren't you talking too fast (like I'm one to talk...) */
-					@media mBGSlide25 { #BGSlide25 { display: block; }}
-					@media mBGSlide26 { #BGSlide26 { display: block; }}
-					@media mBGSlide27 { #BGSlide27 { display: block; }}
-					@media mBGSlide28 { #BGSlide28 { display: block; }}
-					@media mBGSlide29 { #BGSlide29 { display: block; }}
 		        &lt;/style&gt;
+				&lt;script type=&quot;text/javascript&quot;&gt;
+					function displayNotesForSlide(visibleIndex) {
+						slideNotes = document.body.getElementsByClassName(&quot;slide&quot;)
+						for (slideIndex = 0; slideNotes[slideIndex]; slideIndex++) {
+							slide = slideNotes[slideIndex]
+							if (slideIndex == visibleIndex) {
+								slide.style.display = 'block'
+							} else {
+								slide.style.display = 'none'
+							}
+						}
+						return slideNotes
+					}
+				&lt;/script&gt;
 			&lt;/head&gt;
 
 			&lt;body&gt;
 				&lt;xsl:for-each select=&quot;key:slide-list/key:slide&quot;&gt;
 					&lt;div class=&quot;slide&quot;&gt;
-						&lt;xsl:attribute name=&quot;id&quot;&gt;&lt;xsl:value-of select=&quot;str:replace(@sfa:ID, '-', '')&quot;/&gt;&lt;/xsl:attribute&gt;
 						&lt;xsl:for-each select=&quot;key:notes/sf:text-storage/sf:text-body/sf:p&quot;&gt;
 							&lt;p&gt;&lt;xsl:value-of select=&quot;text()&quot;/&gt;&lt;/p&gt;
 						&lt;/xsl:for-each&gt;</diff>
      <filename>presenter-notes.xsl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2dcb2f13a56e37c4562523e177c61ec9329756bf</id>
    </parent>
  </parents>
  <author>
    <name>Timothy J. Wood</name>
    <email>tjw@omnigroup.com</email>
  </author>
  <url>http://github.com/rentzsch/Blitz/commit/e3f9a0640402f8c743a9e93ca9974d26b00f2e58</url>
  <id>e3f9a0640402f8c743a9e93ca9974d26b00f2e58</id>
  <committed-date>2009-09-21T20:11:05-07:00</committed-date>
  <authored-date>2009-09-21T20:11:05-07:00</authored-date>
  <message>Karma.  Swapping slides preserves their identifiers and my media type
hack was based off the id counter.

Now, I'm invoking a JavaScript function to hide/show the note divs by
their index w/in the list of divs (since the slides are reordered in
the Keynote file, even though their ids stay the same on a swap).</message>
  <tree>e9ab2e8a54a039ef3e08c1b5ebc2bb5e64f1d7e2</tree>
  <committer>
    <name>Timothy J. Wood</name>
    <email>tjw@omnigroup.com</email>
  </committer>
</commit>
