Open notes in new window, instead of printing to console
authorJosh Nichols <josh@technicalpickles.com>
Sun, 9 Sep 2012 01:53:43 +0000 (21:53 -0400)
committerJosh Nichols <josh@technicalpickles.com>
Sun, 9 Sep 2012 01:53:43 +0000 (21:53 -0400)
It can be tedious to load up the speaker notes, with the whole having to
open the javascript console, and clicking on the link.

This simplifies it by automatically opening the notes in a new window.
Most browsers will warn that it's trying to open a pop-up, but it's easy
enough to allow it.

plugin/speakernotes/client.js

index 1aba8b8c29837fb5780ff538958bce0583714478..a97ad46abf684cf18b27a57aab636956132106a4 100644 (file)
@@ -5,7 +5,7 @@
        var socket = io.connect(window.location.origin);
        var socketId = Math.random().toString().slice(2);
        
-       console.log('View slide notes at ' + window.location.origin + '/notes/' + socketId);
+        window.open(window.location.origin + '/notes/' + socketId, 'notes-' + socketId)
 
        Reveal.addEventListener( 'slidechanged', function( event ) {
                var nextindexh;