aboutsummaryrefslogtreecommitdiff
path: root/plugin/notes/notes.html
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-04-22 14:14:21 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-04-22 14:14:21 +0200
commitc02d185cfd7c5077b3e296d72e5f0c879bc15bb4 (patch)
tree4a38d409f97657d05d19676f390cdda782e187d5 /plugin/notes/notes.html
parentce05138f9a9065526ee584d2f59e48952910522f (diff)
downloadfreenode-live-2017-presentation-c02d185cfd7c5077b3e296d72e5f0c879bc15bb4.tar
freenode-live-2017-presentation-c02d185cfd7c5077b3e296d72e5f0c879bc15bb4.tar.gz
notes code format tweaks
Diffstat (limited to 'plugin/notes/notes.html')
-rw-r--r--plugin/notes/notes.html47
1 files changed, 29 insertions, 18 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 95cc525..2a3b2ba 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -11,7 +11,7 @@
}
#current-slide,
- #next-slide,
+ #upcoming-slide,
#speaker-controls {
padding: 6px;
box-sizing: border-box;
@@ -19,14 +19,14 @@
}
#current-slide iframe,
- #next-slide iframe {
+ #upcoming-slide iframe {
width: 100%;
height: 100%;
border: 1px solid #ddd;
}
#current-slide .label,
- #next-slide .label {
+ #upcoming-slide .label {
position: absolute;
top: 10px;
left: 10px;
@@ -45,7 +45,7 @@
padding-right: 0;
}
- #next-slide {
+ #upcoming-slide {
position: absolute;
width: 35%;
height: 40%;
@@ -141,7 +141,7 @@
<body>
<div id="current-slide"></div>
- <div id="next-slide"><span class="label">UPCOMING:</span></div>
+ <div id="upcoming-slide"><span class="label">UPCOMING:</span></div>
<div id="speaker-controls">
<div class="speaker-controls-time">
<h4 class="label">Time</h4>
@@ -169,7 +169,7 @@
notesValue,
currentState,
currentSlide,
- nextSlide,
+ upcomingSlide,
connected = false;
window.addEventListener( 'message', function( event ) {
@@ -239,8 +239,8 @@
// Update the note slides
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
- nextSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
- nextSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );
+ upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
+ upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );
}
@@ -249,26 +249,37 @@
*/
function setupIframes( data ) {
- var params = [
+ var currentParams = [
'receiver',
'progress=false',
- 'history=false'
- ];
+ 'history=false',
+ 'postMessageEvents=true'
+ ].join( '&' );
+
+ var upcomingParams = [
+ 'receiver',
+ 'progress=false',
+ 'history=false',
+ 'controls=false',
+ 'transition=none',
+ 'backgroundTransition=none'
+ ].join( '&' );
- var url = data.url + '?' + params.join( '&' );
var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
+ var currentURL = data.url + '?' + currentParams + hash;
+ var upcomingURL = data.url + '?' + upcomingParams + hash;
currentSlide = document.createElement( 'iframe' );
currentSlide.setAttribute( 'width', 1280 );
currentSlide.setAttribute( 'height', 1024 );
- currentSlide.setAttribute( 'src', url + '&postMessageEvents=true' + hash );
+ currentSlide.setAttribute( 'src', currentURL );
document.querySelector( '#current-slide' ).appendChild( currentSlide );
- nextSlide = document.createElement( 'iframe' );
- nextSlide.setAttribute( 'width', 640 );
- nextSlide.setAttribute( 'height', 512 );
- nextSlide.setAttribute( 'src', url + '&controls=false&transition=none&backgroundTransition=none' + hash );
- document.querySelector( '#next-slide' ).appendChild( nextSlide );
+ upcomingSlide = document.createElement( 'iframe' );
+ upcomingSlide.setAttribute( 'width', 640 );
+ upcomingSlide.setAttribute( 'height', 512 );
+ upcomingSlide.setAttribute( 'src', upcomingURL );
+ document.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide );
}