var presentation = ["Bender<\/word>","Futurama<\/word>","comic<\/word>","antihero<\/word>","backstory<\/word>","built<\/word>","Tijuana, Mexico<\/word>","Bender's prejudice<\/word>","against non-robots<\/word>","signature expressions<\/word>","kill all humans<\/word>","Exceptions<\/word>","individuals<\/word>","Do Not Kill list<\/word>","comprise<\/word>","his best friend<\/word>","Philip J. Fry<\/word>","his colleague<\/word>","Hermes Conrad<\/word>","Lethal Inspection<\/word>","sympathetic side<\/word>","not as belligerent as he claims<\/word>","Bender<\/strong> is one of the main characters in the animated television series Futurama<\/strong>. He fulfills a comic<\/strong>, antihero<\/strong>-type role in Futurama<\/strong>. According to the character's backstory<\/strong>, Bender<\/strong> was built<\/strong> in Tijuana, Mexico<\/strong>. Viewers are informed, through his own testimony, of Bender's prejudice<\/strong> against non-robots<\/strong>. For example, one of his signature expressions<\/strong> is \"kill all humans<\/strong>\". Exceptions<\/strong> who are not subject to Bender<\/strong>'s prejudicial attitude are those individuals<\/strong> on his Do Not Kill list<\/strong>, which seems to comprise<\/strong> only his best friend<\/strong> Philip J. Fry<\/strong> and his colleague<\/strong> Hermes Conrad<\/strong> (added after the episode \"Lethal Inspection<\/strong>\"). However, Bender<\/strong> is also occasionally portrayed as possessing a sympathetic side<\/strong>, suggesting that he is not as belligerent as he claims<\/strong>, a view often echoed by his friends.<\/phrase>","Bender<\/word>","high-tech<\/word>","metalworking robot<\/word>","built<\/word>","F\u00e1brica Rob\u00f3tica De La Madre<\/word>","manufacturing facility<\/word>","Mom's Friendly Robot Company<\/word>","Tijuana, Mexico<\/word>","Bender<\/strong>, a high-tech<\/strong> industrial metalworking robot<\/strong>, was built<\/strong> in 2996 at F\u00e1brica Rob\u00f3tica De La Madre<\/strong>, a manufacturing facility<\/strong> of Mom's Friendly Robot Company<\/strong> in Tijuana, Mexico<\/strong>. However, the story of his construction remains a mystery.<\/phrase>","Bender<\/word>","mortal<\/word>","Professor Farnsworth<\/word>","have less than one billion years to live<\/word>","manufacturing error<\/word>","left Bender<\/word>","without a backup unit<\/word>","Bender's memory<\/word>","cannot be transferred<\/word>","uploaded<\/word>","another robot body<\/word>","reporting that defect<\/word>","his manufacturer<\/word>","Bender barely escapes death<\/word>","guided missile<\/word>","robot death squad<\/word>","dispatched by Mom<\/word>","eliminate him<\/word>","take the defective product<\/word>","off the market<\/word>","Unlike most other robots, Bender<\/strong> is mortal<\/strong> and, according to Professor Farnsworth<\/strong>'s calculations, may have less than one billion years to live<\/strong>. Because of a manufacturing error<\/strong> that left Bender<\/strong> without a backup unit<\/strong>, Bender's memory<\/strong> cannot be transferred<\/strong> or uploaded<\/strong> to another robot body<\/strong>. After reporting that defect<\/strong> to his manufacturer<\/strong>, Bender barely escapes death<\/strong> from a guided missile<\/strong> and a robot death squad<\/strong> dispatched by Mom<\/strong> in order to eliminate him<\/strong> and effectively take the defective product<\/strong> off the market<\/strong>.<\/phrase>","Bender<\/word>","programmed<\/word>","cold-bending structural steel<\/word>","attended<\/word>","Mars University<\/word>","majored in bending<\/word>","minored<\/word>","Robo-American Studies<\/word>","member<\/word>","Epsilon Rho Rho<\/word>","robot fraternity<\/word>","fraternity hero<\/word>","shenanigans<\/word>","At the factory, Bender<\/strong> was programmed<\/strong> for cold-bending structural steel<\/strong>. Bender<\/strong> later attended<\/strong> Mars University<\/strong>, where he majored in bending<\/strong> and minored<\/strong> in Robo-American Studies<\/strong>. At the university, he was a member<\/strong> of Epsilon Rho Rho<\/strong>, a robot fraternity<\/strong>, where he became something of a fraternity hero<\/strong> for his many shenanigans<\/strong>.<\/phrase>","Before meeting<\/word>","Fry<\/word>","Leela<\/word>","Planet Express<\/word>","currently works<\/word>","assistant manager<\/word>","sales<\/word>","Bender<\/word>","job<\/word>","metalworking factory<\/word>","bending steel girders<\/word>","Before meeting<\/strong> Fry<\/strong> and Leela<\/strong> and joining Planet Express<\/strong> (where he currently works<\/strong> as the assistant manager<\/strong> of sales<\/strong>), Bender<\/strong> had a job<\/strong> at the metalworking factory<\/strong>, bending steel girders<\/strong>.<\/phrase>","Bender<\/word>","apartment<\/word>","Robot Arms Apts.<\/word>","invites<\/word>","his best friend<\/word>","coworker<\/word>","Fry<\/word>","live with him<\/word>","pair enjoy living together<\/word>","manipulating<\/word>","guileless friend<\/word>","Bender is shown<\/word>","preferring<\/word>","occupy smaller areas of their apartment<\/word>","like the closet<\/word>","later episodes<\/word>","own individual bedroom<\/word>","Bender<\/strong> has an apartment<\/strong> in the \"Robot Arms Apts.<\/strong>\" building, where he eventually invites<\/strong> his best friend<\/strong> and coworker<\/strong>, Fry<\/strong>, to live with him<\/strong>. Although the pair enjoy living together<\/strong>, Bender<\/strong> is sometimes portrayed as manipulating<\/strong> his guileless friend<\/strong>. In the series' early episodes, Bender is shown<\/strong> preferring<\/strong> to occupy smaller areas of their apartment<\/strong>, like the closet<\/strong>, referring to them as cozy, although in later episodes<\/strong> he is shown to have his own individual bedroom<\/strong>, like Fry<\/strong>.<\/phrase>","romantic relationships<\/word>","womanizer<\/word>","does not seem to discriminate<\/word>","between<\/word>","human women<\/word>","robot counterparts<\/word>","actively pursuing both<\/word>","Proposition Infinity<\/word>","Bender<\/word>","secret affair<\/word>","coworker<\/word>","Amy Wong<\/word>","referendum<\/word>","legalizes robosexuality<\/word>","The Bots and the Bees<\/word>","encounter<\/word>","robot soda vending machine<\/word>","birth of a son<\/word>","he names<\/word>","Ben<\/word>","Throughout the series, he enters many romantic relationships<\/strong> of varying duration, and is commonly referred to as a womanizer<\/strong> by his friends. He does not seem to discriminate<\/strong> between<\/strong> human women<\/strong> and their robot counterparts<\/strong>, and is shown actively pursuing both<\/strong>. In \"Proposition Infinity<\/strong>\", Bender<\/strong>'s secret affair<\/strong> with coworker<\/strong> Amy Wong<\/strong> leads to a referendum<\/strong> that, once approved, legalizes robosexuality<\/strong>. In \"The Bots and the Bees<\/strong>\", he has an encounter<\/strong> with a robot soda vending machine<\/strong> that leads to the almost-instantaneous birth of a son<\/strong>, whom he names<\/strong> Ben<\/strong>.<\/phrase>","Professor Farnsworth<\/word>","Bender<\/word>","constructed<\/word>","alloy<\/word>","iron<\/word>","osmium<\/word>","Bender hates magnets<\/word>","magnets interfere<\/word>","inhibition unit<\/word>","uncontrollably<\/word>","start singing folk songs<\/word>","reveal<\/word>","his secret ambition<\/word>","folk singer<\/word>","near-pathological fear<\/word>","electric can openers<\/word>","Professor Farnsworth<\/strong> describes Bender<\/strong> to be constructed<\/strong> of an alloy<\/strong> of iron<\/strong> and osmium<\/strong>. Bender hates magnets<\/strong>, as magnets interfere<\/strong> with his inhibition unit<\/strong>, causing him to uncontrollably<\/strong> start singing folk songs<\/strong> when near his head; and also causing him to reveal<\/strong> his secret ambition<\/strong> to be a folk singer<\/strong>. Bender<\/strong> also has a near-pathological fear<\/strong> of electric can openers<\/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':3260, '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':3260, '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':3260, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }