var presentation = ["Spider-Man: Far From Home<\/word>","superhero film<\/word>","Marvel Comics character<\/word>","sequel<\/word>","Spider-Man: Homecoming<\/word>","recruited by<\/word>","Spider-Man<\/word>","Nick Fury<\/word>","Mysterio<\/word>","face<\/word>","Elementals<\/word>","school trip<\/word>","Europe<\/word>","Spider-Man: Far From Home<\/strong> is a 2019 American superhero film<\/strong> based on the Marvel Comics character<\/strong> Spider-Man<\/strong>. It is the sequel<\/strong> to Spider-Man: Homecoming<\/strong>. In Spider-Man: Far From Home<\/strong>, Parker is recruited by<\/strong> Nick Fury<\/strong> and Mysterio<\/strong> to face<\/strong> the Elementals<\/strong> while he is on a school trip<\/strong> to Europe<\/strong>.<\/phrase>","Ixtenco, Mexico<\/word>","investigate<\/word>","defeat the creature<\/word>","recruited by Fury and Hill<\/word>","Midtown School of Science and Technology<\/word>","restarted<\/word>","accommodate the students who previously disintegrated<\/word>","result of Thanos' actions<\/word>","reappeared un-aged<\/word>","actions of the Avengers<\/word>","Peter Parker<\/word>","still mourning the death<\/word>","Tony Stark<\/word>","reveal to classmate<\/word>","MJ<\/word>","attraction to her<\/word>","Happy Hogan<\/word>","informs Parker<\/word>","Fury intends to contact him<\/word>","Parker ignores Fury's phone call<\/word>","Nick Fury<\/word>","Maria Hill<\/word>","unnatural storm<\/word>","Earth Elemental<\/word>","Quentin Beck<\/word>","super-powered individual<\/word>","New York City<\/word>","two-week summer field trip<\/word>","Europe<\/word>","his mentor<\/word>","father figure<\/word>","In Ixtenco, Mexico<\/strong>, Nick Fury<\/strong> and Maria Hill<\/strong> investigate<\/strong> an unnatural storm<\/strong> and encounter the Earth Elemental<\/strong>. Quentin Beck<\/strong>, a super-powered individual<\/strong>, arrives to defeat the creature<\/strong>. Beck subsequently defeats the Elemental and is recruited by Fury and Hill<\/strong>. Meanwhile, in New York City<\/strong>, the Midtown School of Science and Technology<\/strong> completes its year, which was restarted<\/strong> to accommodate the students who previously disintegrated<\/strong> five years ago as a result of Thanos' actions<\/strong>. They had reappeared un-aged<\/strong>, thanks to the actions of the Avengers<\/strong>. The school organizes a two-week summer field trip<\/strong> to Europe<\/strong>, where Peter Parker<\/strong>-who is still mourning the death<\/strong> of his mentor<\/strong> and father figure<\/strong> Tony Stark<\/strong>-plans to reveal to classmate<\/strong> MJ<\/strong> his attraction to her<\/strong>. Happy Hogan<\/strong> informs Parker<\/strong> that Fury intends to contact him<\/strong>, but Parker ignores Fury's phone call<\/strong>.<\/phrase>","Parker and his classmates<\/word>","Venice, Italy<\/word>","attacks<\/word>","Parker helps protect his classmates<\/word>","Beck arrives<\/word>","destroys the creature<\/word>","Fury meets with Parker<\/word>","gives him Stark's glasses<\/word>","meant for his successor<\/word>","take command<\/word>","artificial intelligence<\/word>","E.D.I.T.H.<\/word>","access to Stark Industries' databases<\/word>","commands<\/word>","large orbital weapons supply<\/word>","Beck claims to hail<\/word>","alternate reality<\/word>","four Elementals killed his family<\/word>","destroyed his civilization<\/word>","appear in Prague<\/word>","Parker declines<\/word>","Fury's invitation<\/word>","join the fight<\/word>","returns to his class trip<\/word>","travel<\/word>","Water Elemental<\/word>","communicate<\/word>","Multiverse<\/word>","Fire Elemental<\/word>","Parker and his classmates<\/strong> travel<\/strong> to Venice, Italy<\/strong>, where the Water Elemental<\/strong> attacks<\/strong>. Parker helps protect his classmates<\/strong>, while Beck arrives<\/strong> and destroys the creature<\/strong>. Fury meets with Parker<\/strong> and gives him Stark's glasses<\/strong>, which were meant for his successor<\/strong>. The glasses enable him to communicate<\/strong> with and take command<\/strong> of the artificial intelligence<\/strong> E.D.I.T.H.<\/strong>, which has access to Stark Industries' databases<\/strong> and commands<\/strong> a large orbital weapons supply<\/strong>. Beck claims to hail<\/strong> from an alternate reality<\/strong> within the Multiverse<\/strong>, where the four Elementals killed his family<\/strong> and destroyed his civilization<\/strong>. He predicts that the Fire Elemental<\/strong> will appear in Prague<\/strong>. Parker declines<\/strong> Fury's invitation<\/strong> to join the fight<\/strong> and returns to his class trip<\/strong>.<\/phrase>","Fury secretly changes the class's itinerary<\/word>","Parker is forced to help Beck<\/word>","protect his friends<\/word>","destroy the creature<\/word>","Fury and Hill invite Parker and Beck to Berlin<\/word>","formation of a new superhero team<\/word>","Beck should go alone<\/word>","transfers control of E.D.I.T.H. to him<\/word>","Beck is secretly a former Stark Industries holographic-illusions specialist<\/word>","fired<\/word>","unstable nature<\/word>","leads a team<\/word>","disgruntled ex-Stark employees<\/word>","advanced projector drones<\/word>","simulate the Elemental attacks<\/word>","masquerade as a hero<\/word>","gain control of E.D.I.T.H.<\/word>","orbital weaponized drones<\/word>","increase the scale of their illusions<\/word>","Prague<\/word>","Fire Elemental<\/word>","use<\/word>","Fury secretly changes the class's itinerary<\/strong> to divert the students to Prague<\/strong>. There, Parker is forced to help Beck<\/strong> fight the Fire Elemental<\/strong> to again protect his friends<\/strong>. Beck manages to destroy the creature<\/strong> with Parker's help. Fury and Hill invite Parker and Beck to Berlin<\/strong> to discuss the formation of a new superhero team<\/strong>, but Parker decides that Beck should go alone<\/strong> and transfers control of E.D.I.T.H. to him<\/strong>. In actuality, Beck is secretly a former Stark Industries holographic-illusions specialist<\/strong> who was fired<\/strong> for his unstable nature<\/strong>, and now leads a team<\/strong> of disgruntled ex-Stark employees<\/strong>, using advanced projector drones<\/strong> to simulate the Elemental attacks<\/strong>, masquerade as a hero<\/strong>, and gain control of E.D.I.T.H.<\/strong> so they use<\/strong> the orbital weaponized drones<\/strong> to increase the scale of their illusions<\/strong>.<\/phrase>","MJ<\/word>","she knows he is Spider-Man<\/word>","piece of debris she retrieved<\/word>","projector<\/word>","Air Elemental's attack<\/word>","realize Beck's deception<\/word>","Parker travels to Berlin<\/word>","warn Fury<\/word>","tricked by Beck<\/word>","revealing the names of his friends<\/word>","know about Beck's plan<\/word>","Parker contacts Hogan<\/word>","E.D.I.T.H.<\/word>","orchestrate a fusion of all the Elementals<\/word>","kill Parker's friends<\/word>","Parker is able to disrupt the illusions<\/word>","Beck attacks him<\/word>","Parker defeats Beck<\/word>","regains control of E.D.I.T.H.<\/word>","Beck is killed<\/word>","one of his associates escapes<\/word>","Parker begins a relationship with MJ<\/word>","battle<\/word>","part<\/word>","London<\/word>","cover<\/word>","New York City<\/word>","After MJ<\/strong> tells Parker she knows he is Spider-Man<\/strong>, they discover that a piece of debris she retrieved<\/strong> during the battle<\/strong> is a projector<\/strong> that shows part<\/strong> of the Air Elemental's attack<\/strong>, leading them to realize Beck's deception<\/strong>. Parker travels to Berlin<\/strong> to warn Fury<\/strong>, only to be tricked by Beck<\/strong> with an illusory Fury into revealing the names of his friends<\/strong> who know about Beck's plan<\/strong>. Left for dead by Beck, Parker contacts Hogan<\/strong>, who flies him to London<\/strong>, where his classmates are. Beck uses E.D.I.T.H.<\/strong> to orchestrate a fusion of all the Elementals<\/strong>, as a cover<\/strong> to kill Parker's friends<\/strong>. Parker is able to disrupt the illusions<\/strong>, so Beck attacks him<\/strong> with drones. Parker defeats Beck<\/strong> and regains control of E.D.I.T.H.<\/strong> Beck is killed<\/strong> by misfired gunshots from the drones, but one of his associates escapes<\/strong> with data from the drones. After returning to New York City<\/strong>, Parker begins a relationship with MJ<\/strong>.<\/phrase>","mid-credits scene<\/word>","J. Jonah Jameson<\/word>","broadcasts doctored footage<\/word>","London incident<\/word>","Beck frames Spider-Man<\/word>","drone attack<\/word>","his death<\/word>","exposing Spider-Man's secret identity to the world<\/word>","post-credits scene<\/word>","Fury and Hill are revealed to be the Skrulls<\/word>","disguise<\/word>","under orders from the real Fury<\/word>","commanding a Skrull spaceship<\/word>","Soren<\/word>","In a mid-credits scene<\/strong>, J. Jonah Jameson<\/strong> of TheDailyBugle.net broadcasts doctored footage<\/strong> of the London incident<\/strong> in which Beck frames Spider-Man<\/strong> for the drone attack<\/strong> and his death<\/strong>, exposing Spider-Man's secret identity to the world<\/strong>, much to Parker's shock. In a post-credits scene<\/strong>, Fury and Hill are revealed to be the Skrulls<\/strong> Talos and Soren<\/strong> in disguise<\/strong>, under orders from the real Fury<\/strong> while he is away commanding a Skrull spaceship<\/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':2342, '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':2342, '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':2342, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }