var presentation = ["Captain Marvel<\/word>","superhero film<\/word>","Marvel Comics character<\/word>","Earth is caught<\/word>","center of a galactic conflict<\/word>","two alien civilizations<\/word>","Carol Danvers<\/word>","Captain Marvel<\/strong> is a 2019 American superhero film<\/strong> based on the Marvel Comics character<\/strong> Carol Danvers<\/strong>. Set in 1995, the story follows Danvers as she becomes Captain Marvel<\/strong> after Earth is caught<\/strong> in the center of a galactic conflict<\/strong> between two alien civilizations<\/strong>.<\/phrase>","amnesia<\/word>","recurring nightmares<\/word>","trains her<\/word>","control her abilities<\/word>","rules the Kree<\/word>","keep her emotions in check<\/word>","Kree Empire<\/word>","capital planet<\/word>","Hala<\/word>","Starforce<\/word>","Vers<\/word>","older woman<\/word>","Yon-Rogg<\/word>","her mentor<\/word>","Supreme Intelligence<\/word>","artificial intelligence<\/word>","In 1995, on the Kree Empire<\/strong>'s capital planet<\/strong> of Hala<\/strong>, Starforce<\/strong> member Vers<\/strong> suffers from amnesia<\/strong> and recurring nightmares<\/strong> involving an older woman<\/strong>. Yon-Rogg<\/strong>, her mentor<\/strong> and commander, trains her<\/strong> to control her abilities<\/strong> while the Supreme Intelligence<\/strong>, the artificial intelligence<\/strong> that rules the Kree<\/strong>, urges her to keep her emotions in check<\/strong>.<\/phrase>","undercover operative<\/word>","infiltrating<\/word>","group of Skrulls<\/word>","Kree are at war<\/word>","Vers is captured<\/word>","Skrull commander<\/word>","probe of Vers's memories<\/word>","Earth<\/word>","S.H.I.E.L.D. agents<\/word>","Nick Fury<\/word>","investigation is interrupted<\/word>","Skrull attack<\/word>","crystal<\/word>","containing her extracted memories<\/word>","Talos, disguised as Fury's boss<\/word>","orders Fury to work with Vers<\/word>","rescue<\/word>","alien shapeshifters<\/word>","Talos<\/word>","Vers<\/word>","escapes and crash-lands<\/word>","Los Angeles<\/word>","Phil Coulson<\/word>","chase<\/word>","Keller<\/word>","During a mission to rescue<\/strong> an undercover operative<\/strong> infiltrating<\/strong> a group of Skrulls<\/strong>, alien shapeshifters<\/strong> with whom the Kree are at war<\/strong>, Vers is captured<\/strong> by Skrull commander<\/strong> Talos<\/strong>. A probe of Vers's memories<\/strong> leads them to Earth<\/strong>. Vers<\/strong> escapes and crash-lands<\/strong> in Los Angeles<\/strong>. Her presence attracts S.H.I.E.L.D. agents<\/strong> Nick Fury<\/strong> and Phil Coulson<\/strong>, whose investigation is interrupted<\/strong> by a Skrull attack<\/strong>. In the ensuing chase<\/strong>, Vers<\/strong> recovers a crystal<\/strong> containing her extracted memories<\/strong> while Fury kills a Skrull impersonating Coulson. Talos, disguised as Fury's boss<\/strong> Keller<\/strong>, orders Fury to work with Vers<\/strong> and keep tabs on her.<\/phrase>","U.S. Air Force base<\/word>","discover Vers was a pilot<\/word>","presumed to have died<\/word>","testing an experimental light-speed engine<\/word>","Dr. Wendy Lawson<\/word>","woman from her nightmares<\/word>","S.H.I.E.L.D.<\/word>","helps Vers escape<\/word>","Lawson's stowaway cat<\/word>","former pilot<\/word>","last person to see Vers and Lawson alive<\/word>","extracted memories<\/word>","Vers<\/word>","Project Pegasus<\/word>","their location<\/word>","Talos<\/word>","Keller<\/word>","Goose<\/word>","Louisiana<\/word>","Maria Rambeau<\/word>","Using her extracted memories<\/strong>, Vers<\/strong> and Fury go to the Project Pegasus<\/strong> installation at a U.S. Air Force base<\/strong>. They discover Vers was a pilot<\/strong> presumed to have died<\/strong> in 1989 while testing an experimental light-speed engine<\/strong> designed by Dr. Wendy Lawson<\/strong>, whom Vers<\/strong> recognizes as the woman from her nightmares<\/strong>. After Fury informs S.H.I.E.L.D.<\/strong> of their location<\/strong>, a team led by Talos<\/strong> disguised as Keller<\/strong> arrives. Fury discovers Talos<\/strong>'s ruse and helps Vers escape<\/strong> in a cargo jet with Lawson's stowaway cat<\/strong> Goose<\/strong>. They fly to Louisiana<\/strong> to meet former pilot<\/strong> Maria Rambeau<\/strong>, the last person to see Vers and Lawson alive<\/strong>.<\/phrase>","Rambeau and her daughter<\/word>","once like family to them<\/word>","refugees<\/word>","searching for a new home<\/word>","Lawson was Mar-Vell<\/word>","renegade Kree scientist helping them<\/word>","remember the crash<\/word>","Lawson was killed by Yon-Rogg<\/word>","destroying the engine<\/word>","before the Kree could recover it<\/word>","Danvers absorbed the energy<\/word>","gaining powers<\/word>","losing her memory<\/word>","Monica<\/word>","Vers<\/word>","Carol Danvers<\/word>","Talos<\/word>","Skrulls<\/word>","prevent<\/word>","Rambeau and her daughter<\/strong> Monica<\/strong> reveal that Vers<\/strong> is Carol Danvers<\/strong>, who was once like family to them<\/strong>. Talos<\/strong>, arriving unarmed, explains that the Skrulls<\/strong> are refugees<\/strong> searching for a new home<\/strong> and that Lawson was Mar-Vell<\/strong>, a renegade Kree scientist helping them<\/strong>. Talos<\/strong> plays a recovered recording from Lawson's jet, prompting Danvers to remember the crash<\/strong>-- Lawson was killed by Yon-Rogg<\/strong> to prevent<\/strong> her from destroying the engine<\/strong> before the Kree could recover it<\/strong>. destroying the engine<\/strong> herself, Danvers absorbed the energy<\/strong> from the ensuing explosion, gaining powers<\/strong> but losing her memory<\/strong>.<\/phrase>","Lawson's cloaked laboratory<\/word>","orbiting Earth<\/word>","Lawson hid several Skrulls<\/word>","power source of Lawson's engine<\/word>","Danvers is captured by Starforce<\/word>","removes the Kree implant<\/word>","suppressing her powers<\/word>","reach her full potential<\/word>","Fury retrieves Goose<\/word>","revealed to be an alien Flerken<\/word>","Goose swallows the Tesseract<\/word>","scratches Fury<\/word>","blinding his left eye<\/word>","Danvers destroys a Kree bomber<\/word>","Kree officer<\/word>","squadron to retreat<\/word>","overpowering<\/word>","Earth<\/word>","sending him back to Hala<\/word>","warning to the Supreme Intelligence<\/word>","Talos<\/word>","Tesseract<\/word>","Supreme Intelligence<\/word>","battle<\/word>","Ronan the Accuser<\/word>","Yon-Rogg<\/word>","Danvers, Talos<\/strong>, Fury, and Rambeau locate Lawson's cloaked laboratory<\/strong> orbiting Earth<\/strong>, where Lawson hid several Skrulls<\/strong>, including Talos<\/strong>'s family, and the Tesseract<\/strong>, the power source of Lawson's engine<\/strong>. There, Danvers is captured by Starforce<\/strong> and interfaces with the Supreme Intelligence<\/strong>. During their conversation, Danvers removes the Kree implant<\/strong> that was suppressing her powers<\/strong>, allowing her to reach her full potential<\/strong>. In the subsequent battle<\/strong>, Fury retrieves Goose<\/strong>, who is revealed to be an alien Flerken<\/strong>. Goose swallows the Tesseract<\/strong> and scratches Fury<\/strong>, blinding his left eye<\/strong>. Danvers destroys a Kree bomber<\/strong>, forcing Kree officer<\/strong> Ronan the Accuser<\/strong> and his squadron to retreat<\/strong>, before overpowering<\/strong> Yon-Rogg<\/strong> on Earth<\/strong> and sending him back to Hala<\/strong> with a warning to the Supreme Intelligence<\/strong>.<\/phrase>","Danvers departs to help the Skrulls<\/word>","new homeworld<\/word>","leaving Fury a modified pager<\/word>","contact her in an emergency<\/word>","Fury drafts an initiative<\/word>","locate heroes<\/word>","naming it after her Air Force call sign<\/word>","mid-credits scene<\/word>","set in 2018<\/word>","activated pager<\/word>","monitored by the Avengers<\/word>","post-credits scene<\/word>","Fury's desk<\/word>","regurgitates the Tesseract<\/word>","Avenger<\/word>","Goose<\/word>","Danvers departs to help the Skrulls<\/strong> find a new homeworld<\/strong>, leaving Fury a modified pager<\/strong> to contact her in an emergency<\/strong>. Meanwhile, Fury drafts an initiative<\/strong> to locate heroes<\/strong> like Danvers, naming it after her Air Force call sign<\/strong>, Avenger<\/strong>. In a mid-credits scene<\/strong>, set in 2018<\/strong>, the activated pager<\/strong> is being monitored by the Avengers<\/strong> when Danvers appears. In a post-credits scene<\/strong>, Goose<\/strong> climbs onto Fury's desk<\/strong> and regurgitates the Tesseract<\/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':2340, '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':2340, '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':2340, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }