var presentation = ["Avengers: Endgame<\/word>","superhero film<\/word>","the Avengers<\/word>","Avengers: Infinity War<\/word>","surviving members of the Avengers<\/word>","reverse the damage<\/word>","caused by Thanos<\/word>","Infinity War<\/word>","Marvel Comics<\/word>","superhero team<\/word>","direct sequel<\/word>","film<\/word>","their allies<\/word>","attempt<\/word>","Avengers: Endgame<\/strong> is a 2019 American superhero film<\/strong> based on the Marvel Comics<\/strong> superhero team<\/strong> the Avengers<\/strong>. It is the direct sequel<\/strong> to Avengers: Infinity War<\/strong>. In the film<\/strong>, the surviving members of the Avengers<\/strong> and their allies<\/strong> attempt<\/strong> to reverse the damage<\/strong> caused by Thanos<\/strong> in Infinity War<\/strong>.<\/phrase>","Thanos used the Infinity Gauntlet<\/word>","kill half of all life<\/word>","rescues<\/word>","reunite with the remaining Avengers<\/word>","James Rhodes<\/word>","Rocket<\/word>","Earth<\/word>","Locating Thanos<\/word>","uninhabited planet<\/word>","Infinity Stones<\/word>","reverse the Snap<\/word>","Thanos destroyed the Stones<\/word>","prevent further use<\/word>","Thor decapitates Thanos<\/word>","Twenty-three days<\/word>","Carol Danvers<\/word>","Tony Stark<\/word>","Nebula<\/word>","Steve Rogers<\/word>","Thor<\/word>","Natasha Romanoff<\/word>","plan<\/word>","use<\/word>","Twenty-three days<\/strong> after Thanos used the Infinity Gauntlet<\/strong> to kill half of all life<\/strong> in the universe, Carol Danvers<\/strong> rescues<\/strong> Tony Stark<\/strong> and Nebula<\/strong> from deep space and they reunite with the remaining Avengers<\/strong>-Bruce Banner, Steve Rogers<\/strong>, Thor<\/strong>, Natasha Romanoff<\/strong>, and James Rhodes<\/strong>-and Rocket<\/strong> on Earth<\/strong>. Locating Thanos<\/strong> on an uninhabited planet<\/strong>, they plan<\/strong> to use<\/strong> the Infinity Stones<\/strong> to reverse the Snap<\/strong>, but Thanos destroyed the Stones<\/strong> to prevent further use<\/strong>. Enraged, Thor decapitates Thanos<\/strong>.<\/phrase>","escapes<\/word>","quantum realm<\/word>","Avengers' compound<\/word>","quantum realm could allow time travel<\/word>","ask Stark to help<\/word>","get the Stones<\/word>","reverse Thanos' disintegrations<\/word>","present<\/word>","Stark refuses<\/word>","his wife<\/word>","daughter<\/word>","relents<\/word>","Rocket<\/word>","merged his intelligence<\/word>","Hulk's strength<\/word>","build a time machine<\/word>","changing the past<\/word>","does not affect their present<\/word>","Banner and Rocket recruit<\/word>","overweight Thor<\/word>","Asgardian refugees' new home<\/word>","Asgard<\/word>","Romanoff recruits Clint Barton<\/word>","vigilante<\/word>","death of his family<\/word>","Scott Lang<\/word>","Pepper Potts<\/word>","Morgan<\/word>","Peter Parker<\/word>","Norway<\/word>","Tokyo<\/word>","Five years later, Scott Lang<\/strong> escapes<\/strong> from the quantum realm<\/strong>. At the Avengers' compound<\/strong>, he explains that he experienced five hours, not years, while trapped. Theorizing the quantum realm could allow time travel<\/strong>, they ask Stark to help<\/strong> them get the Stones<\/strong> from the past to reverse Thanos' disintegrations<\/strong> in the present<\/strong>. Stark refuses<\/strong>, thinking about his wife<\/strong> Pepper Potts<\/strong> and daughter<\/strong> Morgan<\/strong>, but relents<\/strong> after musing over Peter Parker<\/strong>. Stark, Rocket<\/strong>, and Banner, who has since merged his intelligence<\/strong> with the Hulk's strength<\/strong>, build a time machine<\/strong>. Banner notes that changing the past<\/strong> does not affect their present<\/strong>; any changes create alternate realities. In Norway<\/strong>, Banner and Rocket recruit<\/strong> an overweight Thor<\/strong> in the Asgardian refugees' new home<\/strong> New Asgard<\/strong>. In Tokyo<\/strong>, Romanoff recruits Clint Barton<\/strong>, who had become a vigilante<\/strong> after the death of his family<\/strong>.<\/phrase>","Banner, Lang, Rogers, and Stark<\/word>","Loki's attack<\/word>","Ancient One<\/word>","promising to return the various Stones<\/word>","proper points in time<\/word>","Stark and Lang's attempt<\/word>","steal the Space Stone<\/word>","fails<\/word>","2012 Loki to escape with it<\/word>","Rogers and Stark travel<\/word>","S.H.I.E.L.D. headquarters in 1970<\/word>","Stark obtains an earlier version<\/word>","encounters his father<\/word>","Pym Particles<\/word>","Hank Pym<\/word>","return to the present<\/word>","spies lost love<\/word>","travel<\/word>","New York City<\/word>","Sanctum Sanctorum<\/word>","Time Stone<\/word>","Stark Tower<\/word>","Mind Stone<\/word>","Space Stone<\/word>","Howard<\/word>","Peggy Carter<\/word>","Banner, Lang, Rogers, and Stark<\/strong> travel<\/strong> to Loki's attack<\/strong> on New York City<\/strong> in 2012. At the Sanctum Sanctorum<\/strong>, Banner convinces the Ancient One<\/strong> to give him the Time Stone<\/strong> by promising to return the various Stones<\/strong> to their proper points in time<\/strong>. At Stark Tower<\/strong>, Rogers retrieves the Mind Stone<\/strong>, but Stark and Lang's attempt<\/strong> to steal the Space Stone<\/strong> fails<\/strong>, allowing 2012 Loki to escape with it<\/strong>. Rogers and Stark travel<\/strong> to S.H.I.E.L.D. headquarters in 1970<\/strong>, where Stark obtains an earlier version<\/strong> of the Space Stone<\/strong> and encounters his father<\/strong>, Howard<\/strong>. Rogers steals and uses Pym Particles<\/strong> from Hank Pym<\/strong> to return to the present<\/strong> and spies lost love<\/strong>, Peggy Carter<\/strong>.<\/phrase>","Rocket<\/word>","Asgard in 2013<\/word>","Reality Stone<\/word>","Jane Foster<\/word>","retrieving Thor's hammer<\/word>","travel to 2014<\/word>","Nebula and Rhodes travel to Morag<\/word>","steal the Power Stone<\/word>","before Peter Quill can<\/word>","Barton and Romanoff travel to Vormir<\/word>","can only be acquired<\/word>","sacrificing someone they love<\/word>","Romanoff sacrifices herself<\/word>","allowing Barton to get the Stone<\/word>","Rhodes and Nebula<\/word>","attempt to return<\/word>","their own time<\/word>","Nebula is incapacitated<\/word>","cybernetic implants<\/word>","link with her past self<\/word>","2014 Thanos to learn his future self's success<\/word>","eventual death<\/word>","the Avengers<\/word>","2014 Nebula forward in time<\/word>","prepare for his arrival<\/word>","Thor<\/word>","travel<\/word>","Mjolnir<\/word>","Nebula<\/word>","Soul Stone<\/word>","Red Skull<\/word>","Meanwhile, Rocket<\/strong> and Thor<\/strong> travel<\/strong> to Asgard in 2013<\/strong>, extracting the Reality Stone<\/strong> from Jane Foster<\/strong> and retrieving Thor's hammer<\/strong> Mjolnir<\/strong>. Barton, Romanoff, Nebula<\/strong>, and Rhodes travel to 2014<\/strong>; Nebula and Rhodes travel to Morag<\/strong> and steal the Power Stone<\/strong> before Peter Quill can<\/strong>, while Barton and Romanoff travel to Vormir<\/strong>. The Soul Stone<\/strong>'s keeper, Red Skull<\/strong>, reveals it can only be acquired<\/strong> by sacrificing someone they love<\/strong>. Romanoff sacrifices herself<\/strong>, allowing Barton to get the Stone<\/strong>. Rhodes and Nebula<\/strong> attempt to return<\/strong> to their own time<\/strong>, but Nebula is incapacitated<\/strong> when her cybernetic implants<\/strong> link with her past self<\/strong>, allowing 2014 Thanos to learn his future self's success<\/strong> and eventual death<\/strong> at the hands of the Avengers<\/strong>. He sends 2014 Nebula forward in time<\/strong> to prepare for his arrival<\/strong>.<\/phrase>","Reuniting in the present<\/word>","Avengers place the Stones<\/word>","technological gauntlet<\/word>","Rocket<\/word>","Banner, having the most resistance to their gamma radiation<\/word>","wields the gauntlet<\/word>","reverses Thanos' disintegrations<\/word>","2014 Nebula<\/word>","impersonating her future self<\/word>","time machine<\/word>","2014 Thanos<\/word>","present<\/word>","destroying the Avengers' compound<\/word>","convinces 2014 Gamora to betray Thanos<\/word>","unable to convince 2014 Nebula<\/word>","kills her<\/word>","Thanos overpowers<\/word>","summons his army<\/word>","retrieve the Stones<\/word>","destroy the universe<\/word>","create a new one<\/word>","arrives with other sorcerers<\/word>","restored Avengers<\/word>","Guardians of the Galaxy<\/word>","armies<\/word>","Asgard<\/word>","fight Thanos and his army<\/word>","Danvers arrives<\/word>","destroys Thanos' warship<\/word>","Thanos overpowers her<\/word>","seizes the gauntlet<\/word>","Stark steals the Stones<\/word>","disintegrate Thanos and his army<\/word>","cost of his own life<\/word>","transport<\/word>","Nebula<\/word>","Thor<\/word>","Mjolnir<\/word>","Stephen Strange<\/word>","Ravagers<\/word>","Wakanda<\/word>","Reuniting in the present<\/strong>, the Avengers place the Stones<\/strong> into the technological gauntlet<\/strong> Stark, Banner, and Rocket<\/strong> created. Banner, having the most resistance to their gamma radiation<\/strong>, wields the gauntlet<\/strong> and reverses Thanos' disintegrations<\/strong>. Meanwhile, 2014 Nebula<\/strong>, impersonating her future self<\/strong>, uses the time machine<\/strong> to transport<\/strong> 2014 Thanos<\/strong> and his warship to the present<\/strong>, destroying the Avengers' compound<\/strong> in the process. present<\/strong>-day Nebula<\/strong> convinces 2014 Gamora to betray Thanos<\/strong> but is unable to convince 2014 Nebula<\/strong> and kills her<\/strong>. Thanos overpowers<\/strong> Stark, Thor<\/strong>, and a Mjolnir<\/strong>-wielding Rogers and summons his army<\/strong> from his warship to retrieve the Stones<\/strong>, intent on using them to destroy the universe<\/strong> and create a new one<\/strong>. A restored Stephen Strange<\/strong> arrives with other sorcerers<\/strong>, the restored Avengers<\/strong> and Guardians of the Galaxy<\/strong>, the Ravagers<\/strong>, and the armies<\/strong> of Wakanda<\/strong> and Asgard<\/strong> to fight Thanos and his army<\/strong>. Danvers arrives<\/strong> and destroys Thanos' warship<\/strong>, but Thanos overpowers her<\/strong> and seizes the gauntlet<\/strong>. Stark steals the Stones<\/strong> and uses them to disintegrate Thanos and his army<\/strong>, at the cost of his own life<\/strong>.<\/phrase>","Following Stark's funeral<\/word>","appoints<\/word>","new ruler of New Asgard<\/word>","joins the Guardians<\/word>","Rogers returns the Stones<\/word>","their proper timelines<\/word>","remains in the past<\/word>","live with Carter<\/word>","present<\/word>","elderly Rogers<\/word>","passes his shield<\/word>","mantle<\/word>","Thor<\/word>","Valkyrie<\/word>","Mjolnir<\/word>","Sam Wilson<\/word>","Following Stark's funeral<\/strong>, Thor<\/strong> appoints<\/strong> Valkyrie<\/strong> as the new ruler of New Asgard<\/strong> and joins the Guardians<\/strong>. Rogers returns the Stones<\/strong> and Mjolnir<\/strong> to their proper timelines<\/strong> and remains in the past<\/strong> to live with Carter<\/strong>. In the present<\/strong>, an elderly Rogers<\/strong> passes his shield<\/strong> and mantle<\/strong> to Sam Wilson<\/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':2341, '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':2341, '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':2341, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }