scateu.me-jekyll-theme 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/css/main.scss +56 -0
  3. data/feed.xml +30 -0
  4. data/index.html +22 -0
  5. data/js/.DS_Store +0 -0
  6. data/js/flowchart-latest.js +991 -0
  7. data/js/jquery-3.1.1.min.js +4 -0
  8. data/js/qrcode.min.js +1 -0
  9. data/js/raphael-min.js +11 -0
  10. data/js/reveal.js/.gitignore +13 -0
  11. data/js/reveal.js/.travis.yml +5 -0
  12. data/js/reveal.js/CONTRIBUTING.md +23 -0
  13. data/js/reveal.js/Gruntfile.js +176 -0
  14. data/js/reveal.js/LICENSE +19 -0
  15. data/js/reveal.js/README.md +1148 -0
  16. data/js/reveal.js/bower.json +27 -0
  17. data/js/reveal.js/css/print/paper.css +202 -0
  18. data/js/reveal.js/css/print/pdf.css +160 -0
  19. data/js/reveal.js/css/reveal.css +1344 -0
  20. data/js/reveal.js/css/reveal.scss +1412 -0
  21. data/js/reveal.js/css/theme/README.md +21 -0
  22. data/js/reveal.js/css/theme/beige.css +291 -0
  23. data/js/reveal.js/css/theme/black.css +287 -0
  24. data/js/reveal.js/css/theme/blood.css +310 -0
  25. data/js/reveal.js/css/theme/league.css +293 -0
  26. data/js/reveal.js/css/theme/moon.css +291 -0
  27. data/js/reveal.js/css/theme/night.css +285 -0
  28. data/js/reveal.js/css/theme/serif.css +287 -0
  29. data/js/reveal.js/css/theme/simple.css +287 -0
  30. data/js/reveal.js/css/theme/sky.css +294 -0
  31. data/js/reveal.js/css/theme/solarized.css +291 -0
  32. data/js/reveal.js/css/theme/source/beige.scss +39 -0
  33. data/js/reveal.js/css/theme/source/black.scss +49 -0
  34. data/js/reveal.js/css/theme/source/blood.scss +79 -0
  35. data/js/reveal.js/css/theme/source/league.scss +34 -0
  36. data/js/reveal.js/css/theme/source/moon.scss +57 -0
  37. data/js/reveal.js/css/theme/source/night.scss +35 -0
  38. data/js/reveal.js/css/theme/source/serif.scss +35 -0
  39. data/js/reveal.js/css/theme/source/simple.scss +38 -0
  40. data/js/reveal.js/css/theme/source/sky.scss +46 -0
  41. data/js/reveal.js/css/theme/source/solarized.scss +63 -0
  42. data/js/reveal.js/css/theme/source/white.scss +49 -0
  43. data/js/reveal.js/css/theme/template/mixins.scss +29 -0
  44. data/js/reveal.js/css/theme/template/settings.scss +43 -0
  45. data/js/reveal.js/css/theme/template/theme.scss +346 -0
  46. data/js/reveal.js/css/theme/white.css +287 -0
  47. data/js/reveal.js/demo.html +410 -0
  48. data/js/reveal.js/index.html +50 -0
  49. data/js/reveal.js/js/reveal.js +4744 -0
  50. data/js/reveal.js/lib/css/zenburn.css +80 -0
  51. data/js/reveal.js/lib/font/league-gothic/LICENSE +2 -0
  52. data/js/reveal.js/lib/font/league-gothic/league-gothic.css +10 -0
  53. data/js/reveal.js/lib/font/league-gothic/league-gothic.eot +0 -0
  54. data/js/reveal.js/lib/font/league-gothic/league-gothic.ttf +0 -0
  55. data/js/reveal.js/lib/font/league-gothic/league-gothic.woff +0 -0
  56. data/js/reveal.js/lib/font/source-sans-pro/LICENSE +45 -0
  57. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
  58. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
  59. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
  60. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
  61. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
  62. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
  63. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
  64. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
  65. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
  66. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
  67. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
  68. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
  69. data/js/reveal.js/lib/font/source-sans-pro/source-sans-pro.css +39 -0
  70. data/js/reveal.js/lib/js/classList.js +2 -0
  71. data/js/reveal.js/lib/js/head.min.js +9 -0
  72. data/js/reveal.js/lib/js/html5shiv.js +7 -0
  73. data/js/reveal.js/package.json +44 -0
  74. data/js/reveal.js/plugin/highlight/highlight.js +31 -0
  75. data/js/reveal.js/plugin/markdown/example.html +129 -0
  76. data/js/reveal.js/plugin/markdown/markdown.js +405 -0
  77. data/js/reveal.js/plugin/markdown/marked.js +6 -0
  78. data/js/reveal.js/plugin/math/math.js +67 -0
  79. data/js/reveal.js/plugin/multiplex/client.js +13 -0
  80. data/js/reveal.js/plugin/multiplex/index.js +64 -0
  81. data/js/reveal.js/plugin/multiplex/master.js +31 -0
  82. data/js/reveal.js/plugin/multiplex/package.json +19 -0
  83. data/js/reveal.js/plugin/notes-server/client.js +65 -0
  84. data/js/reveal.js/plugin/notes-server/index.js +69 -0
  85. data/js/reveal.js/plugin/notes-server/notes.html +407 -0
  86. data/js/reveal.js/plugin/notes/notes.html +414 -0
  87. data/js/reveal.js/plugin/notes/notes.js +136 -0
  88. data/js/reveal.js/plugin/print-pdf/print-pdf.js +48 -0
  89. data/js/reveal.js/plugin/search/search.js +196 -0
  90. data/js/reveal.js/plugin/zoom-js/zoom.js +278 -0
  91. data/js/reveal.js/test/examples/assets/image1.png +0 -0
  92. data/js/reveal.js/test/examples/assets/image2.png +0 -0
  93. data/js/reveal.js/test/examples/barebones.html +41 -0
  94. data/js/reveal.js/test/examples/embedded-media.html +49 -0
  95. data/js/reveal.js/test/examples/math.html +185 -0
  96. data/js/reveal.js/test/examples/slide-backgrounds.html +144 -0
  97. data/js/reveal.js/test/examples/slide-transitions.html +101 -0
  98. data/js/reveal.js/test/qunit-1.12.0.css +244 -0
  99. data/js/reveal.js/test/qunit-1.12.0.js +2212 -0
  100. data/js/reveal.js/test/test-markdown-element-attributes.html +134 -0
  101. data/js/reveal.js/test/test-markdown-element-attributes.js +46 -0
  102. data/js/reveal.js/test/test-markdown-slide-attributes.html +128 -0
  103. data/js/reveal.js/test/test-markdown-slide-attributes.js +47 -0
  104. data/js/reveal.js/test/test-markdown.html +52 -0
  105. data/js/reveal.js/test/test-markdown.js +15 -0
  106. data/js/reveal.js/test/test-pdf.html +83 -0
  107. data/js/reveal.js/test/test-pdf.js +15 -0
  108. data/js/reveal.js/test/test.html +86 -0
  109. data/js/reveal.js/test/test.js +597 -0
  110. data/js/sequence-diagram-min.js +8 -0
  111. data/js/underscore-min.js +1 -0
  112. metadata +111 -1
@@ -0,0 +1,414 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+
6
+ <title>reveal.js - Slide Notes</title>
7
+
8
+ <style>
9
+ body {
10
+ font-family: Helvetica;
11
+ }
12
+
13
+ #current-slide,
14
+ #upcoming-slide,
15
+ #speaker-controls {
16
+ padding: 6px;
17
+ box-sizing: border-box;
18
+ -moz-box-sizing: border-box;
19
+ }
20
+
21
+ #current-slide iframe,
22
+ #upcoming-slide iframe {
23
+ width: 100%;
24
+ height: 100%;
25
+ border: 1px solid #ddd;
26
+ }
27
+
28
+ #current-slide .label,
29
+ #upcoming-slide .label {
30
+ position: absolute;
31
+ top: 10px;
32
+ left: 10px;
33
+ font-weight: bold;
34
+ font-size: 14px;
35
+ z-index: 2;
36
+ color: rgba( 255, 255, 255, 0.9 );
37
+ }
38
+
39
+ #current-slide {
40
+ position: absolute;
41
+ width: 65%;
42
+ height: 100%;
43
+ top: 0;
44
+ left: 0;
45
+ padding-right: 0;
46
+ }
47
+
48
+ #upcoming-slide {
49
+ position: absolute;
50
+ width: 35%;
51
+ height: 40%;
52
+ right: 0;
53
+ top: 0;
54
+ }
55
+
56
+ #speaker-controls {
57
+ position: absolute;
58
+ top: 40%;
59
+ right: 0;
60
+ width: 35%;
61
+ height: 60%;
62
+ overflow: auto;
63
+
64
+ font-size: 18px;
65
+ }
66
+
67
+ .speaker-controls-time.hidden,
68
+ .speaker-controls-notes.hidden {
69
+ display: none;
70
+ }
71
+
72
+ .speaker-controls-time .label,
73
+ .speaker-controls-notes .label {
74
+ text-transform: uppercase;
75
+ font-weight: normal;
76
+ font-size: 0.66em;
77
+ color: #666;
78
+ margin: 0;
79
+ }
80
+
81
+ .speaker-controls-time {
82
+ border-bottom: 1px solid rgba( 200, 200, 200, 0.5 );
83
+ margin-bottom: 10px;
84
+ padding: 10px 16px;
85
+ padding-bottom: 20px;
86
+ cursor: pointer;
87
+ }
88
+
89
+ .speaker-controls-time .reset-button {
90
+ opacity: 0;
91
+ float: right;
92
+ color: #666;
93
+ text-decoration: none;
94
+ }
95
+ .speaker-controls-time:hover .reset-button {
96
+ opacity: 1;
97
+ }
98
+
99
+ .speaker-controls-time .timer,
100
+ .speaker-controls-time .clock {
101
+ width: 50%;
102
+ font-size: 1.9em;
103
+ }
104
+
105
+ .speaker-controls-time .timer {
106
+ float: left;
107
+ }
108
+
109
+ .speaker-controls-time .clock {
110
+ float: right;
111
+ text-align: right;
112
+ }
113
+
114
+ .speaker-controls-time span.mute {
115
+ color: #bbb;
116
+ }
117
+
118
+ .speaker-controls-notes {
119
+ padding: 10px 16px;
120
+ }
121
+
122
+ .speaker-controls-notes .value {
123
+ margin-top: 5px;
124
+ line-height: 1.4;
125
+ font-size: 1.2em;
126
+ }
127
+
128
+ .clear {
129
+ clear: both;
130
+ }
131
+
132
+ @media screen and (max-width: 1080px) {
133
+ #speaker-controls {
134
+ font-size: 16px;
135
+ }
136
+ }
137
+
138
+ @media screen and (max-width: 900px) {
139
+ #speaker-controls {
140
+ font-size: 14px;
141
+ }
142
+ }
143
+
144
+ @media screen and (max-width: 800px) {
145
+ #speaker-controls {
146
+ font-size: 12px;
147
+ }
148
+ }
149
+
150
+ </style>
151
+ </head>
152
+
153
+ <body>
154
+
155
+ <div id="current-slide"></div>
156
+ <div id="upcoming-slide"><span class="label">UPCOMING:</span></div>
157
+ <div id="speaker-controls">
158
+ <div class="speaker-controls-time">
159
+ <h4 class="label">Time <span class="reset-button">Click to Reset</span></h4>
160
+ <div class="clock">
161
+ <span class="clock-value">0:00 AM</span>
162
+ </div>
163
+ <div class="timer">
164
+ <span class="hours-value">00</span><span class="minutes-value">:00</span><span class="seconds-value">:00</span>
165
+ </div>
166
+ <div class="clear"></div>
167
+ </div>
168
+
169
+ <div class="speaker-controls-notes hidden">
170
+ <h4 class="label">Notes</h4>
171
+ <div class="value"></div>
172
+ </div>
173
+ </div>
174
+
175
+ <script src="../../plugin/markdown/marked.js"></script>
176
+ <script>
177
+
178
+ (function() {
179
+
180
+ var notes,
181
+ notesValue,
182
+ currentState,
183
+ currentSlide,
184
+ upcomingSlide,
185
+ connected = false;
186
+
187
+ window.addEventListener( 'message', function( event ) {
188
+
189
+ var data = JSON.parse( event.data );
190
+
191
+ // The overview mode is only useful to the reveal.js instance
192
+ // where navigation occurs so we don't sync it
193
+ if( data.state ) delete data.state.overview;
194
+
195
+ // Messages sent by the notes plugin inside of the main window
196
+ if( data && data.namespace === 'reveal-notes' ) {
197
+ if( data.type === 'connect' ) {
198
+ handleConnectMessage( data );
199
+ }
200
+ else if( data.type === 'state' ) {
201
+ handleStateMessage( data );
202
+ }
203
+ }
204
+ // Messages sent by the reveal.js inside of the current slide preview
205
+ else if( data && data.namespace === 'reveal' ) {
206
+ if( /ready/.test( data.eventName ) ) {
207
+ // Send a message back to notify that the handshake is complete
208
+ window.opener.postMessage( JSON.stringify({ namespace: 'reveal-notes', type: 'connected'} ), '*' );
209
+ }
210
+ else if( /slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
211
+
212
+ window.opener.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ]} ), '*' );
213
+
214
+ }
215
+ }
216
+
217
+ } );
218
+
219
+ /**
220
+ * Called when the main window is trying to establish a
221
+ * connection.
222
+ */
223
+ function handleConnectMessage( data ) {
224
+
225
+ if( connected === false ) {
226
+ connected = true;
227
+
228
+ setupIframes( data );
229
+ setupKeyboard();
230
+ setupNotes();
231
+ setupTimer();
232
+ }
233
+
234
+ }
235
+
236
+ /**
237
+ * Called when the main window sends an updated state.
238
+ */
239
+ function handleStateMessage( data ) {
240
+
241
+ // Store the most recently set state to avoid circular loops
242
+ // applying the same state
243
+ currentState = JSON.stringify( data.state );
244
+
245
+ // No need for updating the notes in case of fragment changes
246
+ if ( data.notes ) {
247
+ notes.classList.remove( 'hidden' );
248
+ notesValue.style.whiteSpace = data.whitespace;
249
+ if( data.markdown ) {
250
+ notesValue.innerHTML = marked( data.notes );
251
+ }
252
+ else {
253
+ notesValue.innerHTML = data.notes;
254
+ }
255
+ }
256
+ else {
257
+ notes.classList.add( 'hidden' );
258
+ }
259
+
260
+ // Update the note slides
261
+ currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
262
+ upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
263
+ upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );
264
+
265
+ }
266
+
267
+ // Limit to max one state update per X ms
268
+ handleStateMessage = debounce( handleStateMessage, 200 );
269
+
270
+ /**
271
+ * Forward keyboard events to the current slide window.
272
+ * This enables keyboard events to work even if focus
273
+ * isn't set on the current slide iframe.
274
+ */
275
+ function setupKeyboard() {
276
+
277
+ document.addEventListener( 'keydown', function( event ) {
278
+ currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
279
+ } );
280
+
281
+ }
282
+
283
+ /**
284
+ * Creates the preview iframes.
285
+ */
286
+ function setupIframes( data ) {
287
+
288
+ var params = [
289
+ 'receiver',
290
+ 'progress=false',
291
+ 'history=false',
292
+ 'transition=none',
293
+ 'autoSlide=0',
294
+ 'backgroundTransition=none'
295
+ ].join( '&' );
296
+
297
+ var urlSeparator = /\?/.test(data.url) ? '&' : '?';
298
+ var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
299
+ var currentURL = data.url + urlSeparator + params + '&postMessageEvents=true' + hash;
300
+ var upcomingURL = data.url + urlSeparator + params + '&controls=false' + hash;
301
+
302
+ currentSlide = document.createElement( 'iframe' );
303
+ currentSlide.setAttribute( 'width', 1280 );
304
+ currentSlide.setAttribute( 'height', 1024 );
305
+ currentSlide.setAttribute( 'src', currentURL );
306
+ document.querySelector( '#current-slide' ).appendChild( currentSlide );
307
+
308
+ upcomingSlide = document.createElement( 'iframe' );
309
+ upcomingSlide.setAttribute( 'width', 640 );
310
+ upcomingSlide.setAttribute( 'height', 512 );
311
+ upcomingSlide.setAttribute( 'src', upcomingURL );
312
+ document.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide );
313
+
314
+ }
315
+
316
+ /**
317
+ * Setup the notes UI.
318
+ */
319
+ function setupNotes() {
320
+
321
+ notes = document.querySelector( '.speaker-controls-notes' );
322
+ notesValue = document.querySelector( '.speaker-controls-notes .value' );
323
+
324
+ }
325
+
326
+ /**
327
+ * Create the timer and clock and start updating them
328
+ * at an interval.
329
+ */
330
+ function setupTimer() {
331
+
332
+ var start = new Date(),
333
+ timeEl = document.querySelector( '.speaker-controls-time' ),
334
+ clockEl = timeEl.querySelector( '.clock-value' ),
335
+ hoursEl = timeEl.querySelector( '.hours-value' ),
336
+ minutesEl = timeEl.querySelector( '.minutes-value' ),
337
+ secondsEl = timeEl.querySelector( '.seconds-value' );
338
+
339
+ function _updateTimer() {
340
+
341
+ var diff, hours, minutes, seconds,
342
+ now = new Date();
343
+
344
+ diff = now.getTime() - start.getTime();
345
+ hours = Math.floor( diff / ( 1000 * 60 * 60 ) );
346
+ minutes = Math.floor( ( diff / ( 1000 * 60 ) ) % 60 );
347
+ seconds = Math.floor( ( diff / 1000 ) % 60 );
348
+
349
+ clockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } );
350
+ hoursEl.innerHTML = zeroPadInteger( hours );
351
+ hoursEl.className = hours > 0 ? '' : 'mute';
352
+ minutesEl.innerHTML = ':' + zeroPadInteger( minutes );
353
+ minutesEl.className = minutes > 0 ? '' : 'mute';
354
+ secondsEl.innerHTML = ':' + zeroPadInteger( seconds );
355
+
356
+ }
357
+
358
+ // Update once directly
359
+ _updateTimer();
360
+
361
+ // Then update every second
362
+ setInterval( _updateTimer, 1000 );
363
+
364
+ timeEl.addEventListener( 'click', function() {
365
+ start = new Date();
366
+ _updateTimer();
367
+ return false;
368
+ } );
369
+
370
+ }
371
+
372
+ function zeroPadInteger( num ) {
373
+
374
+ var str = '00' + parseInt( num );
375
+ return str.substring( str.length - 2 );
376
+
377
+ }
378
+
379
+ /**
380
+ * Limits the frequency at which a function can be called.
381
+ */
382
+ function debounce( fn, ms ) {
383
+
384
+ var lastTime = 0,
385
+ timeout;
386
+
387
+ return function() {
388
+
389
+ var args = arguments;
390
+ var context = this;
391
+
392
+ clearTimeout( timeout );
393
+
394
+ var timeSinceLastCall = Date.now() - lastTime;
395
+ if( timeSinceLastCall > ms ) {
396
+ fn.apply( context, args );
397
+ lastTime = Date.now();
398
+ }
399
+ else {
400
+ timeout = setTimeout( function() {
401
+ fn.apply( context, args );
402
+ lastTime = Date.now();
403
+ }, ms - timeSinceLastCall );
404
+ }
405
+
406
+ }
407
+
408
+ }
409
+
410
+ })();
411
+
412
+ </script>
413
+ </body>
414
+ </html>
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Handles opening of and synchronization with the reveal.js
3
+ * notes window.
4
+ *
5
+ * Handshake process:
6
+ * 1. This window posts 'connect' to notes window
7
+ * - Includes URL of presentation to show
8
+ * 2. Notes window responds with 'connected' when it is available
9
+ * 3. This window proceeds to send the current presentation state
10
+ * to the notes window
11
+ */
12
+ var RevealNotes = (function() {
13
+
14
+ function openNotes( notesFilePath ) {
15
+
16
+ if( !notesFilePath ) {
17
+ var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
18
+ jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
19
+ notesFilePath = jsFileLocation + 'notes.html';
20
+ }
21
+
22
+ var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
23
+
24
+ /**
25
+ * Connect to the notes window through a postmessage handshake.
26
+ * Using postmessage enables us to work in situations where the
27
+ * origins differ, such as a presentation being opened from the
28
+ * file system.
29
+ */
30
+ function connect() {
31
+ // Keep trying to connect until we get a 'connected' message back
32
+ var connectInterval = setInterval( function() {
33
+ notesPopup.postMessage( JSON.stringify( {
34
+ namespace: 'reveal-notes',
35
+ type: 'connect',
36
+ url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
37
+ state: Reveal.getState()
38
+ } ), '*' );
39
+ }, 500 );
40
+
41
+ window.addEventListener( 'message', function( event ) {
42
+ var data = JSON.parse( event.data );
43
+ if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
44
+ clearInterval( connectInterval );
45
+ onConnected();
46
+ }
47
+ } );
48
+ }
49
+
50
+ /**
51
+ * Posts the current slide data to the notes window
52
+ */
53
+ function post() {
54
+
55
+ var slideElement = Reveal.getCurrentSlide(),
56
+ notesElement = slideElement.querySelector( 'aside.notes' );
57
+
58
+ var messageData = {
59
+ namespace: 'reveal-notes',
60
+ type: 'state',
61
+ notes: '',
62
+ markdown: false,
63
+ whitespace: 'normal',
64
+ state: Reveal.getState()
65
+ };
66
+
67
+ // Look for notes defined in a slide attribute
68
+ if( slideElement.hasAttribute( 'data-notes' ) ) {
69
+ messageData.notes = slideElement.getAttribute( 'data-notes' );
70
+ messageData.whitespace = 'pre-wrap';
71
+ }
72
+
73
+ // Look for notes defined in an aside element
74
+ if( notesElement ) {
75
+ messageData.notes = notesElement.innerHTML;
76
+ messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
77
+ }
78
+
79
+ notesPopup.postMessage( JSON.stringify( messageData ), '*' );
80
+
81
+ }
82
+
83
+ /**
84
+ * Called once we have established a connection to the notes
85
+ * window.
86
+ */
87
+ function onConnected() {
88
+
89
+ // Monitor events that trigger a change in state
90
+ Reveal.addEventListener( 'slidechanged', post );
91
+ Reveal.addEventListener( 'fragmentshown', post );
92
+ Reveal.addEventListener( 'fragmenthidden', post );
93
+ Reveal.addEventListener( 'overviewhidden', post );
94
+ Reveal.addEventListener( 'overviewshown', post );
95
+ Reveal.addEventListener( 'paused', post );
96
+ Reveal.addEventListener( 'resumed', post );
97
+
98
+ // Post the initial state
99
+ post();
100
+
101
+ }
102
+
103
+ connect();
104
+
105
+ }
106
+
107
+ if( !/receiver/i.test( window.location.search ) ) {
108
+
109
+ // If the there's a 'notes' query set, open directly
110
+ if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
111
+ openNotes();
112
+ }
113
+
114
+ // Open the notes when the 's' key is hit
115
+ document.addEventListener( 'keydown', function( event ) {
116
+ // Disregard the event if the target is editable or a
117
+ // modifier is present
118
+ if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
119
+
120
+ // Disregard the event if keyboard is disabled
121
+ if ( Reveal.getConfig().keyboard === false ) return;
122
+
123
+ if( event.keyCode === 83 ) {
124
+ event.preventDefault();
125
+ openNotes();
126
+ }
127
+ }, false );
128
+
129
+ // Show our keyboard shortcut in the reveal.js help overlay
130
+ if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
131
+
132
+ }
133
+
134
+ return { open: openNotes };
135
+
136
+ })();