var presentation = ["Breaking the Fourth Wall<\/word>","seventh episode<\/word>","television miniseries<\/word>","WandaVision<\/word>","Marvel Comics characters<\/word>","Wanda Maximoff<\/word>","Scarlet Witch<\/word>","Vision<\/word>","Westview<\/word>","idyllic suburban life<\/word>","unravel<\/word>","Marvel Cinematic Universe<\/word>","\"Breaking the Fourth Wall<\/strong>\" is the seventh episode<\/strong> of the American television miniseries<\/strong> WandaVision<\/strong>, based on the Marvel Comics characters<\/strong> Wanda Maximoff<\/strong> \/ Scarlet Witch<\/strong> and Vision<\/strong>. It follows the couple inside the town of Westview<\/strong> as their idyllic suburban life<\/strong> begins to unravel<\/strong>. The episode is set in the Marvel Cinematic Universe<\/strong>.<\/phrase>","late 2000s setting<\/word>","Wanda Maximoff<\/word>","day to herself<\/word>","Agnes agrees<\/word>","babysit<\/word>","Billy<\/word>","Tommy<\/word>","Vision<\/word>","S.W.O.R.D. agents inside the boundary<\/word>","members of a circus<\/word>","finds Darcy Lewis<\/word>","frees her from the spell<\/word>","tells Vision about his death<\/word>","Wanda sees<\/word>","parts of her house constantly changing<\/word>","unable to control them<\/word>","Vision and Darcy's journey<\/word>","continuously interrupted<\/word>","junction point<\/word>","Wanda is preventing him<\/word>","coming home<\/word>","his wife needs him<\/word>","flies the rest of the way home<\/word>","In a late 2000s setting<\/strong>, Wanda Maximoff<\/strong> decides to have a day to herself<\/strong>. Agnes agrees<\/strong> to babysit<\/strong> Billy<\/strong> and Tommy<\/strong> and takes them to her house. Vision<\/strong> wakes up and finds the S.W.O.R.D. agents inside the boundary<\/strong> are now members of a circus<\/strong>. He finds Darcy Lewis<\/strong> and frees her from the spell<\/strong>. After leaving the circus, Darcy tells Vision about his death<\/strong> and the events that led to the current situation. Meanwhile, Wanda sees<\/strong> various parts of her house constantly changing<\/strong> and is unable to control them<\/strong>. Vision and Darcy's journey<\/strong> back to his house is continuously interrupted<\/strong> at a junction point<\/strong>, leading Vision<\/strong> to assume that Wanda is preventing him<\/strong> from coming home<\/strong>. However, he also realizes that his wife needs him<\/strong> and flies the rest of the way home<\/strong>, leaving Darcy behind.<\/phrase>","Westview<\/word>","Monica Rambeau<\/word>","Jimmy Woo<\/word>","S.W.O.R.D. personnel<\/word>","obtain a vehicle<\/word>","be able to cross the barrier<\/word>","mission is unsuccessful<\/word>","Monica decides to enter herself<\/word>","gained powers<\/word>","warn Wanda<\/word>","S.W.O.R.D. director<\/word>","Tyler Hayward<\/word>","Wanda does not believe her<\/word>","attacks<\/word>","confrontation is interrupted by Agnes<\/word>","asks Monica to leave<\/word>","Outside of Westview<\/strong>, Monica Rambeau<\/strong> and Jimmy Woo<\/strong> meet with loyal S.W.O.R.D. personnel<\/strong> and obtain a vehicle<\/strong> that should be able to cross the barrier<\/strong>. The mission is unsuccessful<\/strong>, as half of the vehicle transforms into an old van. Monica decides to enter herself<\/strong> since she has already passed through the boundary twice. She passes through the static wall and emerges with glowing eyes and having gained powers<\/strong>. She goes to warn Wanda<\/strong> about S.W.O.R.D. director<\/strong> Tyler Hayward<\/strong>, but Wanda does not believe her<\/strong> and attacks<\/strong>, but Monica is able to land firmly due to her newfound powers. Their confrontation is interrupted by Agnes<\/strong>, who asks Monica to leave<\/strong> and takes Wanda to her house.<\/phrase>","Agnes tells Wanda<\/word>","twins are in the basement<\/word>","lair<\/word>","mysterious book in the center<\/word>","Trapping Wanda<\/word>","Agnes reveals herself<\/word>","Agatha Harkness<\/word>","powerful sorceress<\/word>","controlling part of the events<\/word>","gives Wanda a vision<\/word>","she killed Sparky<\/word>","sent<\/word>","fake Pietro Maximoff<\/word>","shifting the WandaVision program<\/word>","new show<\/word>","Agatha All Along<\/word>","Agnes tells Wanda<\/strong> that the twins are in the basement<\/strong>, but when Wanda goes to look for them, she finds a lair<\/strong> with a mysterious book in the center<\/strong>. Trapping Wanda<\/strong>, Agnes reveals herself<\/strong> as Agatha Harkness<\/strong>, a powerful sorceress<\/strong> who has been controlling part of the events<\/strong> the whole time. She gives Wanda a vision<\/strong> revealing she killed Sparky<\/strong> and sent<\/strong>\nthe fake Pietro Maximoff<\/strong> to Wanda, while shifting the WandaVision program<\/strong> to a new show<\/strong> called Agatha All Along<\/strong>.<\/phrase>","mid-credits scene<\/word>","Monica investigates Agatha's house<\/word>","discovers her lair<\/word>","caught by fake Pietro<\/word>","In a mid-credits scene<\/strong>, Monica investigates Agatha's house<\/strong> and discovers her lair<\/strong> in the basement, only to be caught by fake Pietro<\/strong>.<\/phrase>","commercial<\/word>","WandaVision<\/word>","Nexus anti-depression drugs<\/word>","A commercial<\/strong> during the WandaVision<\/strong> program advertises Nexus anti-depression drugs<\/strong>.<\/phrase>"]; var currentPosition = 0; var totalPositions = 0; var timePerWord = 1500; var timePerPhraseWord = 120 var readAheadPlayerTimer; var autoPlay = true; var setMinimized = false; var wordSpeedOptions = {'Slower':2000,'Moderate':1200,'Fast':800}; var phraseSpeedOptions = {'Slower':280,'Moderate':200,'Fast':80}; var defaultWordSpeedOption = 'Moderate'; var defaultPhraseSpeedOption = 'Moderate'; var logToLTI = false; $(window).load(function(){ totalPositions = presentation.length; if (totalPositions > 0){ $('body').prepend('
'); $('body').prepend('
'); $('#read_ahead_player').prepend('
'); initializeReadAheadControls(); initializeReadAheadSlider(); initializeReadAheadSpeedOptions(); currentReadAheadControls(); resumeReadAheadPlayback(); } }); $(document).keyup(function(e){ switch(e.which) { case 37: pauseReadAheadPresentation(); priorReadAheadPresentationItem(); break; case 39: pauseReadAheadPresentation(); nextReadAheadPresentationItem(); break; default: break; } }); function initializeReadAheadControls(){ var s = ''; s += ''; s += ''; s += ''; s += '
'; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += '
'; $('#read_ahead_player').append(s); } function initializeReadAheadSlider(){ var s = ''; s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').prepend(s); updateReadAheadSliderPosition(); } function initializeReadAheadSpeedOptions(){ var s = '
'; s += '
'; s += ' Word Speed
'; s += '
'; optionCount = 0; for (index in wordSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in wordSpeedOptions) { var option = wordSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadWordSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; s += ' Phrase Speed
'; s += '
'; optionCount = 0; for (index in phraseSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in phraseSpeedOptions) { var option = phraseSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadPhraseSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').append(s); } function updateReadAheadWordSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0) { timePerWord = microseconds; } if (sender!=undefined) { $('#slider_control_word_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadWordSpeed','Presentation',microseconds); } function updateReadAheadPhraseSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0 ) { timePerPhraseWord = microseconds; } if (sender!=undefined) { $('#slider_control_phrase_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadPhraseSpeed','Presentation',microseconds); } function updateReadAheadSliderPosition(){ var currentSliderBarWidth = 100 - (100 / totalPositions * (currentPosition + 1)); $('#readAheadSliderBar').css('width',currentSliderBarWidth+'%'); } function currentReadAheadControls(){ $('#read_ahead_player_pause_play').show(); if (currentPosition < totalPositions - 1) { $('#read_ahead_player_next_word').removeClass('disabled'); } else { $('#read_ahead_player_next_word').addClass('disabled'); } if (currentPosition > 0) { $('#read_ahead_player_previous_word').removeClass('disabled'); } else { $('#read_ahead_player_previous_word').addClass('disabled'); } } function restartReadAheadPresentation(){ currentPosition = 0; logReadAheadPlayerAction('restartReadAheadPresentation','Presentation',''); resumeReadAheadPlayback(); } function resumeReadAheadPlayback(){ $('.fa-repeat').removeClass('fa-repeat').addClass('fa-play'); $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-play').removeClass('fa-play').addClass('fa-pause'); $(this).off('click'); $(this).attr('onclick','pauseReadAheadPresentation()'); }); logReadAheadPlayerAction('resumeReadAheadPlayback','Presentation',''); playReadAheadPresentation(); } function pauseReadAheadPresentation(){ $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-pause').removeClass('fa-pause').addClass('fa-play'); $(this).off('click'); $(this).attr('onclick','resumeReadAheadPlayback()'); }); logReadAheadPlayerAction('pauseReadAheadPresentation','Presentation',''); read_ahead_pause(); } function endReadAheadPresentation(){ $('.fa-play').removeClass('fa-play').addClass('fa-repeat'); $('.fa-pause').removeClass('fa-pause').addClass('fa-repeat'); $('#read_ahead_player_pause_play').each(function(){ $(this).off('click'); $(this).attr('onclick','restartReadAheadPresentation()'); }); logReadAheadPlayerAction('endReadAheadPresentation','Presentation',''); logLTIEndPresentation(); } function playReadAheadPresentation(){ autoPlay=true; currentPosition--; logReadAheadPlayerAction('playReadAheadPresentation','Presentation',''); nextReadAheadPresentationItem(); } function startReadAheadStepper(timeDisplayWord){ clearInterval(readAheadPlayerTimer); readAheadPlayerTimer = setTimeout(function() { read_ahead_step(); },timeDisplayWord); } function stopReadAheadStepper(){ clearInterval(readAheadPlayerTimer); } function read_ahead_step(){ if (autoPlay) { nextReadAheadPresentationItem(); } } function read_ahead_pause(){ autoPlay=false; stopReadAheadStepper(); } function showReadAheadPresentationItem(index){ currentPosition = index; currentPresentationItem = presentation[currentPosition] != undefined ? presentation[currentPosition].trim() : ""; if (currentPresentationItem != "") { currentItemWordCount = presentation[currentPosition].replace("\n","").split(" ").length; if (currentPresentationItem.startsWith("")){ startReadAheadStepper(currentItemWordCount*timePerWord); $('#read_ahead_player_field').html('
'+currentPresentationItem+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Word',currentPresentationItem); } else { startReadAheadStepper(currentItemWordCount*timePerPhraseWord); $('#read_ahead_player_field').html('
'+currentPresentationItem.replace("\n","
")+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Phrase',''); } } else { if (currentPosition < totalPositions) { nextReadAheadPresentationItem(); } else { endReadAheadPresentation(); read_ahead_minimize(); } } currentReadAheadControls(); updateReadAheadSliderPosition(); saveReadAheadPosition(); } function priorReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('priorReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition-1); } function nextReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('nextReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition+1); } function read_ahead_playAgain(){ currentWordIndex = 0; logReadAheadPlayerAction('read_ahead_playAgain','Controls',''); playReadAheadPresentation(); } function read_ahead_minimize(){ setMinimized = true; logReadAheadPlayerAction('read_ahead_minimize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_maximize(){ setMinimized = false; logReadAheadPlayerAction('read_ahead_maximize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_switch_min_max(forceSwitch){ forceSwitch = forceSwitch != undefined ? forceSwitch : false; if (forceSwitch) { setMinimized = !setMinimized; } if (setMinimized) { $('#read_ahead_player_back').fadeOut(); $('#read_ahead_player').addClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-lg').addClass('fa-sm'); $('.player-icons .fa-minus').removeClass('fa-minus').addClass('fa-expand'); logReadAheadPlayerAction('read_ahead_switch_min_max','Min',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_maximize()'); //}); } else { $('#read_ahead_player_back').fadeIn(); $('#read_ahead_player').removeClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-sm').addClass('fa-lg'); $('.player-icons .fa-expand').removeClass('fa-expand').addClass('fa-minus'); logReadAheadPlayerAction('read_ahead_switch_min_max','Max',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_minimize()'); //}); } } function saveReadAheadPosition(){ $.ajax({ type:'POST', url:'/ajax/save_user_presentation_position.php', data: { 'id':2804, 'position': currentPosition } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); } function logLTIEndPresentation(action) { if (!logToLTI) { return; } $.ajax({ type:'POST', url:'/lti/presentationEnded.php', data: { 'documentId':2804, 'userId':0, } }) } function logReadAheadPlayerAction(action,area,details){ var d = new Date(); var t = d.getTime(); action = action != undefined ? action.trim() : 'UNKNOWN'; area = area != undefined ? area.trim() : ''; details = details != undefined ? details : ''; // If we are about to show a new word, increase the number of keywords // reinforced so we can log that for the Dashboard page. if (area == 'Word') { window.keywordCount++; } $.ajax({ type:'POST', url:'/logging/logPlayerAction.php', data: { 'documentId':2804, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }