Parcourir la source

the speaker view presentation URL can be overridden via (needed for reveal.js docs)

hakimel il y a 3 ans
Parent
commit
e33c3c72f9
3 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 0 0
      plugin/notes/notes.esm.js
  2. 0 0
      plugin/notes/notes.js
  3. 7 2
      plugin/notes/plugin.js

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
plugin/notes/notes.esm.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
plugin/notes/notes.js


+ 7 - 2
plugin/notes/plugin.js

@@ -67,13 +67,18 @@ const Plugin = () => {
 		*/
 		*/
 	function connect() {
 	function connect() {
 
 
+		const presentationURL = deck.getConfig().url;
+
+		const url = typeof presentationURL === 'string' ? presentationURL :
+								window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
+
 		// Keep trying to connect until we get a 'connected' message back
 		// Keep trying to connect until we get a 'connected' message back
 		connectInterval = setInterval( function() {
 		connectInterval = setInterval( function() {
 			speakerWindow.postMessage( JSON.stringify( {
 			speakerWindow.postMessage( JSON.stringify( {
 				namespace: 'reveal-notes',
 				namespace: 'reveal-notes',
 				type: 'connect',
 				type: 'connect',
-				url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
+				state: deck.getState(),
-				state: deck.getState()
+				url
 			} ), '*' );
 			} ), '*' );
 		}, 500 );
 		}, 500 );
 
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff