the speaker view presentation URL can be overridden via (needed for reveal.js docs)
This commit is contained in:
parent
5e12c6aeb7
commit
e33c3c72f9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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 );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user