瀏覽代碼

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

hakimel 3 年之前
父節點
當前提交
e33c3c72f9
共有 3 個文件被更改,包括 7 次插入2 次删除
  1. 0 0
      plugin/notes/notes.esm.js
  2. 0 0
      plugin/notes/notes.js
  3. 7 2
      plugin/notes/plugin.js

文件差異過大導致無法顯示
+ 0 - 0
plugin/notes/notes.esm.js


文件差異過大導致無法顯示
+ 0 - 0
plugin/notes/notes.js


+ 7 - 2
plugin/notes/plugin.js

@@ -67,13 +67,18 @@ const Plugin = () => {
 		*/
 	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
 		connectInterval = setInterval( function() {
 			speakerWindow.postMessage( JSON.stringify( {
 				namespace: 'reveal-notes',
 				type: 'connect',
-				url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
-				state: deck.getState()
+				state: deck.getState(),
+				url
 			} ), '*' );
 		}, 500 );
 

部分文件因文件數量過多而無法顯示