configure notes presentation through query string to avoid flicker
authorHakim El Hattab <hakim.elhattab@gmail.com>
Tue, 22 Oct 2013 13:21:42 +0000 (09:21 -0400)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Tue, 22 Oct 2013 13:21:49 +0000 (09:21 -0400)
plugin/notes/notes.html

index 0e1238f7a794f488721d90cc856d3b414d3926e1..847499d2b959c5c602f7ca91cafc45791c892fc7 100644 (file)
 
        <body>
 
+               <script>
+                       function getNotesURL( controls ) {
+                               return window.opener.location.protocol + '//' + window.opener.location.host + window.opener.location.pathname + '?receiver&controls='+ ( controls || 'false' ) +'&progress=false&overview=false' + window.opener.location.hash;
+                       }
+                       var notesCurrentSlideURL = getNotesURL( true );
+                       var notesNextSlideURL = getNotesURL( false );
+               </script>
+
                <div id="wrap-current-slide" class="slides">
-                       <script>document.write( '<iframe width="1280" height="1024" id="current-slide" src="'+ window.opener.location.href +'?receiver"></iframe>' );</script>
+                       <script>document.write( '<iframe width="1280" height="1024" id="current-slide" src="'+ notesCurrentSlideURL +'"></iframe>' );</script>
                </div>
 
                <div id="wrap-next-slide" class="slides">
-                       <script>document.write( '<iframe width="640" height="512" id="next-slide" src="'+ window.opener.location.href +'?receiver"></iframe>' );</script>
+                       <script>document.write( '<iframe width="640" height="512" id="next-slide" src="'+ notesNextSlideURL +'"></iframe>' );</script>
                        <span>UPCOMING:</span>
                </div>
 
                                        currentSlide.contentWindow.Reveal.addEventListener( 'fragmentshown', synchronizeMainWindow );
                                        currentSlide.contentWindow.Reveal.addEventListener( 'fragmenthidden', synchronizeMainWindow );
 
-                                       // Reconfigure the notes window to remove needless UI
-                                       currentSlide.contentWindow.Reveal.configure({ controls: false, progress: false, overview: false });
-                                       nextSlide.contentWindow.Reveal.configure({ controls: false, progress: false, overview: false });
-
                                }
                                else {