( cssConsole, cssIframe )
| 3035 | }; |
| 3036 | |
| 3037 | var _init = function( cssConsole, cssIframe ) { |
| 3038 | if ( cssConsole !== undefined ) { |
| 3039 | cssFile = cssConsole; |
| 3040 | } |
| 3041 | |
| 3042 | // You can also specify the css in the presentation root div: |
| 3043 | // <div id="impress" data-console-css=..." data-console-css-iframe="..."> |
| 3044 | else if ( root.dataset.consoleCss !== undefined ) { |
| 3045 | cssFile = root.dataset.consoleCss; |
| 3046 | } |
| 3047 | |
| 3048 | if ( cssIframe !== undefined ) { |
| 3049 | cssFileIframe = cssIframe; |
| 3050 | } else if ( root.dataset.consoleCssIframe !== undefined ) { |
| 3051 | cssFileIframe = root.dataset.consoleCssIframe; |
| 3052 | } |
| 3053 | |
| 3054 | // Register the event |
| 3055 | root.addEventListener( 'impress:stepleave', onStepLeave ); |
| 3056 | root.addEventListener( 'impress:stepenter', onStepEnter ); |
| 3057 | root.addEventListener( 'impress:substep:stepleaveaborted', onSubstep ); |
| 3058 | root.addEventListener( 'impress:substep:show', onSubstepShow ); |
| 3059 | root.addEventListener( 'impress:substep:hide', onSubstepHide ); |
| 3060 | |
| 3061 | //When the window closes, clean up after ourselves. |
| 3062 | window.onunload = function() { |
| 3063 | if ( consoleWindow && !consoleWindow.closed ) { |
| 3064 | consoleWindow.close(); |
| 3065 | } |
| 3066 | }; |
| 3067 | |
| 3068 | //Open speaker console when they press 'p' |
| 3069 | registerKeyEvent( [ 80 ], open, window ); |
| 3070 | |
| 3071 | //Btw, you can also launch console automatically: |
| 3072 | //<div id="impress" data-console-autolaunch="true"> |
| 3073 | if ( root.dataset.consoleAutolaunch === 'true' ) { |
| 3074 | open(); |
| 3075 | } |
| 3076 | }; |
| 3077 | |
| 3078 | var init = function( cssConsole, cssIframe ) { |
| 3079 | if ( ( cssConsole === undefined || cssConsole === cssFileOldDefault ) && |
no test coverage detected