var presentation = ["Justice League<\/word>","superhero film<\/word>","DC Comics superhero team<\/word>","fifth installment<\/word>","DC Extended Universe<\/word>","follow-up<\/word>","Batman v Superman: Dawn of Justice<\/word>","Batman<\/word>","Wonder Woman<\/word>","The Flash<\/word>","Aquaman<\/word>","Cyborg<\/word>","Superman's death<\/word>","save the world<\/word>","catastrophic threat<\/word>","Steppenwolf<\/word>","Parademons<\/word>","Justice League<\/strong> is a 2017 American superhero film<\/strong> based on the DC Comics superhero team<\/strong> of the same name. It is the fifth installment<\/strong> in the DC Extended Universe<\/strong> and the follow-up<\/strong> to Batman v Superman: Dawn of Justice<\/strong>. In the film, Batman<\/strong> and Wonder Woman<\/strong> recruit The Flash<\/strong>, Aquaman<\/strong>, and Cyborg<\/strong> after Superman's death<\/strong> to save the world<\/strong> from the catastrophic threat<\/strong> of Steppenwolf<\/strong> and his army of Parademons<\/strong>.<\/phrase>","Steppenwolf<\/word>","Parademons<\/word>","attempted to take over the Earth<\/word>","three Mother Boxes<\/word>","attempt was foiled<\/word>","unified alliance<\/word>","Olympian Gods, Amazons, Atlanteans, humanity, and extraterrestrial beings<\/word>","Steppenwolf's army<\/word>","Mother Boxes were separated and hidden<\/word>","different locations<\/word>","humanity is still in mourning<\/word>","Superman's death<\/word>","triggered the Mother Boxes' reactivation<\/word>","Steppenwolf's return to Earth<\/word>","Steppenwolf aims to regain favor<\/word>","master Darkseid<\/word>","gathering the boxes to form The Unity<\/word>","destroy Earth<\/word>","Steppenwolf's homeworld<\/word>","present<\/word>","Thousands of years ago, Steppenwolf<\/strong> and his legions of Parademons<\/strong> had attempted to take over the Earth<\/strong> using the combined energies of the three Mother Boxes<\/strong>. The attempt was foiled<\/strong> by a unified alliance<\/strong> including the Olympian Gods, Amazons, Atlanteans, humanity, and extraterrestrial beings<\/strong>. After Steppenwolf's army<\/strong> was repelled, the Mother Boxes were separated and hidden<\/strong> in different locations<\/strong>. In the present<\/strong>, humanity is still in mourning<\/strong> two years after Superman's death<\/strong>, which triggered the Mother Boxes' reactivation<\/strong> and Steppenwolf's return to Earth<\/strong>. Steppenwolf aims to regain favor<\/strong> with his master Darkseid<\/strong> by gathering the boxes to form The Unity<\/strong>, which will destroy Earth<\/strong>'s ecology and terraform it in the image of Steppenwolf's homeworld<\/strong>.<\/phrase>","Steppenwolf<\/word>","retrieves one Mother Box<\/word>","Themyscira<\/word>","Queen Hippolyta<\/word>","warn her daughter<\/word>","Diana Prince<\/word>","Diana joins Bruce Wayne<\/word>","unite other metahumans<\/word>","Wayne goes after Arthur Curry and Barry Allen<\/word>","Diana locates Victor Stone<\/word>","Wayne fails to persuade Curry<\/word>","Allen enthusiastic to join<\/word>","Diana fails to persuade Stone<\/word>","agrees to help them locate the threat<\/word>","Stone later joins<\/word>","his father Silas<\/word>","several other S.T.A.R. Labs employees<\/word>","kidnapped by Steppenwolf<\/word>","seeking the Mother Box<\/word>","Steppenwolf<\/strong> retrieves one Mother Box<\/strong> from Themyscira<\/strong>, prompting Queen Hippolyta<\/strong> to warn her daughter<\/strong> Diana Prince<\/strong>. Diana joins Bruce Wayne<\/strong> in an attempt to unite other metahumans<\/strong> to their cause: Wayne goes after Arthur Curry and Barry Allen<\/strong>, while Diana locates Victor Stone<\/strong>. Wayne fails to persuade Curry<\/strong> but finds Allen enthusiastic to join<\/strong> the team. Although Diana fails to persuade Stone<\/strong> to join, he agrees to help them locate the threat<\/strong>. Stone later joins<\/strong> after his father Silas<\/strong> and several other S.T.A.R. Labs employees<\/strong> are kidnapped by Steppenwolf<\/strong>, who is seeking the Mother Box<\/strong> protected by humanity.<\/phrase>","Steppenwolf attacks an Atlantean outpost<\/word>","retrieve the next Mother Box<\/word>","forcing Curry into action<\/word>","receives intel<\/word>","Commissioner James Gordon<\/word>","Steppenwolf's army<\/word>","abandoned facility<\/word>","Gotham Harbor<\/word>","group rescues the kidnapped employees<\/word>","facility is flooded<\/word>","traps the team<\/word>","Curry helps delay the flood<\/word>","they can escape<\/word>","Stone retrieves the last Mother Box<\/word>","Stone reveals<\/word>","father used the Mother Box<\/word>","rebuild Stone's body<\/word>","accident almost cost him his life<\/word>","Wayne decides to use<\/word>","Mother Box to resurrect Superman<\/word>","help them fight off Steppenwolf's invasion<\/word>","restore hope to humanity<\/word>","Diana and Curry are hesitant<\/word>","Wayne promises a secret contingency plan<\/word>","in case Superman returns as a hostile<\/word>","Steppenwolf attacks an Atlantean outpost<\/strong> to retrieve the next Mother Box<\/strong>, forcing Curry into action<\/strong>. The team receives intel<\/strong> from Commissioner James Gordon<\/strong>, leading them to Steppenwolf's army<\/strong> in an abandoned facility<\/strong> under Gotham Harbor<\/strong>. Although the group rescues the kidnapped employees<\/strong>, the facility is flooded<\/strong> during combat, which traps the team<\/strong> until Curry helps delay the flood<\/strong> so they can escape<\/strong>. Stone retrieves the last Mother Box<\/strong>, which he had hidden, for the group to analyze. Stone reveals<\/strong> that his father used the Mother Box<\/strong> to rebuild Stone's body<\/strong> after an accident almost cost him his life<\/strong>. Wayne decides to use<\/strong> the Mother Box to resurrect Superman<\/strong>, not only to help them fight off Steppenwolf's invasion<\/strong> but also to restore hope to humanity<\/strong>. Diana and Curry are hesitant<\/strong> about the idea, but Wayne promises a secret contingency plan<\/strong> in case Superman returns as a hostile<\/strong>.<\/phrase>","Clark Kent's body is exhumed<\/word>","Cyborg<\/word>","Kryptonian scout ship<\/word>","with the Mother Box<\/word>","Flash activates<\/word>","resurrecting Superman<\/word>","Superman's memories have not returned<\/word>","he attacks the group<\/word>","verge of being killed<\/word>","Batman<\/word>","enacts his contingency plan<\/word>","Lois Lane<\/word>","Superman calms down<\/word>","family home in Smallville<\/word>","memories slowly come back<\/word>","last Mother Box is left unguarded<\/word>","Steppenwolf to retrieve it<\/word>","Without Superman to aid them<\/word>","five heroes travel to a village in Russia<\/word>","Steppenwolf aims to unite the Mother Boxes<\/word>","remake Earth<\/word>","team fights<\/word>","Parademons<\/word>","reach Steppenwolf<\/word>","unable to distract him<\/word>","Stone to separate the Mother Boxes<\/word>","Superman arrives<\/word>","assists Allen in evacuating the city<\/word>","separating the Mother Boxes<\/word>","team defeats Steppenwolf<\/word>","attacked by his own Parademons<\/word>","teleport away<\/word>","Clark Kent's body is exhumed<\/strong> by Cyborg<\/strong> and placed in the amniotic fluid of the genesis chamber in the Kryptonian scout ship<\/strong>, along with the Mother Box<\/strong> which Flash activates<\/strong>, successfully resurrecting Superman<\/strong>. However, Superman's memories have not returned<\/strong>, and he attacks the group<\/strong> after Stone accidentally launches an attack at him. On the verge of being killed<\/strong>, Batman<\/strong> enacts his contingency plan<\/strong>-- Lois Lane<\/strong>. Superman calms down<\/strong> and leaves with Lane to his family home in Smallville<\/strong>, where he reflects, and his memories slowly come back<\/strong>. In the turmoil, the last Mother Box is left unguarded<\/strong>, allowing Steppenwolf to retrieve it<\/strong>. Without Superman to aid them<\/strong>, the five heroes travel to a village in Russia<\/strong> where Steppenwolf aims to unite the Mother Boxes<\/strong> once again to remake Earth<\/strong>. The team fights<\/strong> their way through the Parademons<\/strong> to reach Steppenwolf<\/strong>, but are unable to distract him<\/strong> enough for Stone to separate the Mother Boxes<\/strong>. Superman arrives<\/strong> and assists Allen in evacuating the city<\/strong>, as well as Stone in separating the Mother Boxes<\/strong>. The team defeats Steppenwolf<\/strong>, who, overcome with fear, is attacked by his own Parademons<\/strong> before they all teleport away<\/strong>.<\/phrase>","Bruce and Diana agree<\/word>","set up a base of operations<\/word>","room for more members<\/word>","Diana steps back into the public spotlight<\/word>","Barry acquires a job in Central City's police department<\/word>","Victor continues to explore and enhance his abilities<\/word>","Arthur embraces his Atlantean heritage<\/word>","protecting people on the seas<\/word>","Superman resumes his life<\/word>","reporter Clark Kent<\/word>","protector of Earth<\/word>","Bruce gets the Kents' house back from the bank<\/word>","post-credits scene<\/word>","Lex Luthor has escaped from Arkham Asylum<\/word>","recruits Slade Wilson<\/word>","form their own league<\/word>","After the battle, Bruce and Diana agree<\/strong> to set up a base of operations<\/strong> for the team, with room for more members<\/strong>. As the team establishes, Diana steps back into the public spotlight<\/strong> as a heroine; Barry acquires a job in Central City's police department<\/strong>, impressing his father; Victor continues to explore and enhance his abilities<\/strong> with his father in S.T.A.R. Labs; Arthur embraces his Atlantean heritage<\/strong> and continues protecting people on the seas<\/strong>; Superman resumes his life<\/strong> as reporter Clark Kent<\/strong> and as protector of Earth<\/strong>; and Bruce gets the Kents' house back from the bank<\/strong>. In a post-credits scene<\/strong>, Lex Luthor has escaped from Arkham Asylum<\/strong> and recruits Slade Wilson<\/strong> to form their own league<\/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':2785, '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':2785, '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':2785, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }