aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2016-03-09 09:57:58 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2016-03-09 09:57:58 +0100
commit8e3a7f03d189391f88f56b8ac7c96db709d7cba7 (patch)
treeb9d113f71b0823876dc25a08374f8f0490f52380 /plugin
parent922677ac66d6a40eba23e5f9ac3fc10d9145b203 (diff)
downloadfosdem-2018-presentation-8e3a7f03d189391f88f56b8ac7c96db709d7cba7.tar
fosdem-2018-presentation-8e3a7f03d189391f88f56b8ac7c96db709d7cba7.tar.gz
notes plugin no longer syncs overview mode #1446
Diffstat (limited to 'plugin')
-rw-r--r--plugin/notes/notes.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 8523e98..c80e77f 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -188,6 +188,10 @@
var data = JSON.parse( event.data );
+ // The overview mode is only useful to the reveal.js instance
+ // where navigation occurs so we don't sync it
+ if( data.state ) delete data.state.overview;
+
// Messages sent by the notes plugin inside of the main window
if( data && data.namespace === 'reveal-notes' ) {
if( data.type === 'connect' ) {
@@ -203,8 +207,10 @@
// Send a message back to notify that the handshake is complete
window.opener.postMessage( JSON.stringify({ namespace: 'reveal-notes', type: 'connected'} ), '*' );
}
- else if( /slidechanged|fragmentshown|fragmenthidden|overviewshown|overviewhidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
+ else if( /slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
+
window.opener.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ]} ), '*' );
+
}
}