var presentation = ["Progress of Invention<\/word>","Nineteenth Century<\/word>","The Progress of Invention<\/strong> in the Nineteenth Century<\/strong>\nby Edward W. Byrn<\/phrase>","PERSPECTIVE VIEW<\/word>","CHAPTER I.\nTHE PERSPECTIVE VIEW<\/strong>.<\/phrase>","Twentieth Century<\/word>","back<\/word>","magnificent museum<\/word>","passive gems<\/word>","useful agencies<\/word>","man<\/word>","philosophical mind<\/word>","slow<\/word>","uniform processes<\/word>","normal growth<\/word>","natural development<\/word>","tidal wave<\/word>","human ingenuity<\/word>","expand<\/word>","full appreciation<\/word>","grand climax<\/word>","brilliant campaign<\/word>","fertile resources<\/word>","modern thought<\/word>","modern strength<\/word>","Standing on the threshold of the Twentieth Century<\/strong>, and looking back<\/strong> a\nhundred years, the Nineteenth Century<\/strong> presents in the field of invention\na magnificent museum<\/strong> of thoughts crystallized and made immortal, not as\npassive gems<\/strong> of nature, but as potent, active, useful agencies<\/strong> of man<\/strong>.\nThe philosophical mind<\/strong> is ever accustomed to regard all stages of growth\nas proceeding by slow<\/strong> and uniform processes<\/strong> of evolution, but in the\nfield of invention the Nineteenth Century<\/strong> has been unique. It has been\nsomething more than a merely normal growth<\/strong> or natural development<\/strong>. It\nhas been a gigantic tidal wave<\/strong> of human ingenuity<\/strong> and resource, so\nstupendous in its magnitude, so complex in its diversity, so profound in\nits thought, so fruitful in its wealth, so beneficent in its results,\nthat the mind is strained and embarrassed in its effort to expand<\/strong> to a\nfull appreciation<\/strong> of it. Indeed, the period seems a grand climax<\/strong> of\ndiscovery, rather than an increment of growth. It has been a splendid,\nbrilliant campaign<\/strong> of brains and energy, rising to the highest\nachievement amid the most fertile resources<\/strong>, and conducted by the\nstrongest and best equipment of modern thought<\/strong> and modern strength<\/strong>.<\/phrase>","great works<\/word>","mere monuments<\/word>","manual labor<\/word>","coral insect<\/word>","last century<\/word>","practical embodiment<\/word>","labor-saving inventions<\/word>","single mind<\/word>","sacred quality<\/word>","The great works<\/strong> of the ancients are in the main mere monuments<\/strong> of the\npatient manual labor<\/strong> of myriads of workers, and can only rank with the\nbuildings of the diatom and coral insect<\/strong>. Not so with modern\nachievement. The last century<\/strong> has been peculiarly an age of ideas and\nconservation of energy, materialized in practical embodiment<\/strong> as\nlabor-saving inventions<\/strong>, often the product of a single mind<\/strong>, and\npartaking of the sacred quality<\/strong> of creation.<\/phrase>","old word<\/word>","new world<\/word>","invention mind<\/word>","matter<\/word>","creation unfolds<\/word>","empty consolation<\/word>","busy man<\/word>","divine breath<\/word>","The old word<\/strong> of creation is, that God breathed into the clay the breath\nof life. In the new world<\/strong> of invention mind<\/strong> has breathed into matter<\/strong>,\nand a new and expanding creation unfolds<\/strong> itself. The speculative\nphilosophy of the past is but a too empty consolation<\/strong> for short-lived,\nbusy man<\/strong>, and, seeing with the eye of science the possibilities of\nmatter<\/strong>, he has touched it with the divine breath<\/strong> of thought and made a\nnew world<\/strong>.<\/phrase>","swaddling clothes<\/word>","stretch<\/word>","young arms<\/word>","tremendous energy<\/word>","James Watt<\/word>","steam engine<\/word>","Eli Whitney<\/word>","cotton gin<\/word>","printing type<\/word>","Franklin<\/word>","press<\/word>","When the Nineteenth Century<\/strong> registered its advent in history, the world\nof invention was a babe still in its swaddling clothes<\/strong>, but, with a\nconsciousness of coming power, was beginning to stretch<\/strong> its strong\nyoung arms<\/strong> into the tremendous energy<\/strong> of its life. James Watt<\/strong> had\ninvented the steam engine<\/strong>. Eli Whitney<\/strong> had given us the cotton gin<\/strong>. John\nGutenberg had made his printing type<\/strong>. Franklin<\/strong> had set up his press<\/strong>.<\/phrase>","ethereal space<\/word>","best friend<\/word>","deadly agency<\/word>","inventive genius<\/word>","tallow candle<\/word>","human mind<\/word>","black arts<\/word>","natural laws<\/word>","greater obstacles<\/word>","ignorant fear<\/word>","The telescope had suggested the possibilities of ethereal space<\/strong>, the compass\nwas already the mariner's best friend<\/strong>, and gunpowder had given proof of\nits deadly agency<\/strong>, but inventive genius<\/strong> was still groping by the light\nof a tallow candle<\/strong>. Even up to the beginning of this century so strong a\nhold had superstition on the human mind<\/strong>, that inventions were almost\nsynonymous with the black arts<\/strong>, and the struggling genius had not only\nto contend with the natural laws<\/strong> and the thousand and one expected\ndifficulties that hedge the path of the inventor, but had also to\novercome the far greater obstacles<\/strong> of ignorant fear<\/strong> and bigoted\nprejudice.<\/phrase>","labor-saving machine<\/word>","upon askance<\/word>","earnest inventor<\/word>","saw<\/word>","cherished model<\/word>","fellow men<\/word>","new era<\/word>","legitimate results<\/word>","larger incomes<\/word>","shorter hours<\/word>","world delights<\/word>","A labor-saving machine<\/strong> was looked upon askance<\/strong> as the enemy\nof the working man<\/strong>, and many an earnest inventor<\/strong>, after years of arduous\nthought and painstaking labor, saw<\/strong> his cherished model<\/strong> broken up and his\nhopes forever blasted by the animosity of his fellow men<\/strong>. But with the\nNineteenth Century<\/strong> a new era<\/strong> has dawned. The legitimate results<\/strong> of\ninventions have been realized in larger incomes<\/strong>, shorter hours<\/strong> of labor,\nand lives so much richer in health, comfort, happiness, and usefulness,\nthat to-day the inventor is a benefactor whom the world delights<\/strong> to\nhonor.<\/phrase>","busy life<\/word>","modern civilization<\/word>","work<\/word>","open<\/word>","hand<\/word>","daily existence<\/word>","fail<\/word>","full measure<\/word>","positive appreciation<\/word>","great things<\/word>","great age<\/word>","first<\/word>","like<\/word>","little while<\/word>","accept<\/word>","common life<\/word>","So crowded is the busy life<\/strong> of modern civilization<\/strong> with the\nevidences of his work<\/strong>, that it is impossible to open<\/strong> one's eyes without\nseeing it on every hand<\/strong>, woven into the very fabric of daily existence<\/strong>.\nIt is easy to lose sight of the wonderful when once familiar with it,\nand we usually fail<\/strong> to give the full measure<\/strong> of positive appreciation<\/strong> to\nthe great things<\/strong> of this great age<\/strong>. They burst upon our vision at first<\/strong>\nlike<\/strong> flashing meteors; we marvel at them for a little while<\/strong>, and then we\naccept<\/strong> them as facts, which soon become so commonplace and so fused into\nthe common life<\/strong> as to be only noticed by their omission.<\/phrase>","appreciate<\/word>","easy task<\/word>","noonday sun<\/word>","superior brilliancy<\/word>","lesser light<\/word>","quick run<\/word>","To appreciate<\/strong> them let us briefly contrast the conditions of to-day with\nthose of a hundred years ago. This is no easy task<\/strong>, for the comparison\nnot only involves the experiences of two generations, but it is like<\/strong> the\njuxtaposition of a star with the noonday sun<\/strong>, whose superior brilliancy<\/strong>\nobliterates the lesser light<\/strong>. But reverse the wheels of progress, and\nlet us make a quick run<\/strong> of one hundred years into the past, and what are\nour experiences? Before we get to our destination we find the wheels\nthemselves beginning to thump and jolt, and the passage becomes more\ndifficult, more uncomfortable, and so much slower.<\/phrase>","luxurious palace car<\/word>","magnificent locomotive<\/word>","steel rails<\/word>","sixty miles<\/word>","dusty stage-coach<\/word>","Pause<\/word>","consider<\/word>","change<\/word>","broader aspects<\/word>","examine<\/word>","present<\/word>","real value<\/word>","We are no longer gliding along in a luxurious palace car<\/strong> behind a magnificent locomotive<\/strong>,\ntraveling on steel rails<\/strong>, at sixty miles<\/strong> an hour, but we find ourselves\nnearing the beginning of the Nineteenth Century<\/strong> in a rickety, rumbling,\ndusty stage-coach<\/strong>. Pause<\/strong>! and consider<\/strong> the change<\/strong> for a moment in some\nof its broader aspects<\/strong>. First<\/strong>, let us examine<\/strong> the present<\/strong> more closely,\nfor the average busy man<\/strong>, never looking behind him for comparisons, does\nnot fully appreciate<\/strong> or estimate at its real value<\/strong> the age in which he\nlives.<\/phrase>","entire world<\/word>","mother earth<\/word>","thirty-four belts<\/word>","hundred thousand miles<\/word>","United States<\/word>","entire mileage<\/word>","many passenger coaches<\/word>","freight cars<\/word>","continuous trains<\/word>","American continent<\/word>","Atlantic<\/word>","Pacific Ocean<\/word>","passenger trains<\/word>","thirty-seven trains<\/word>","freight train movement<\/word>","like manner<\/word>","fifty-three trains<\/word>","Add<\/word>","other countries<\/word>","coach<\/word>","There are to-day (statistics of 1898), 445,064 miles of railway\ntracks in the world. This would build seventeen different railway\ntracks, of two rails each, around the entire world<\/strong>, or would girdle\nmother earth<\/strong> with thirty-four belts<\/strong> of steel. If extended in straight\nlines, it would build a track of two rails to the moon, and more than a\nhundred thousand miles<\/strong> beyond it. The United States<\/strong> has nearly half of the entire mileage<\/strong> of the world, and gets along with 36,746 locomotives, nearly as many passenger coaches<\/strong>, and more than a million and a quarter\nof freight cars<\/strong>, which latter, if coupled together, would make nearly\nthree continuous trains<\/strong> reaching across the American continent<\/strong> from the\nAtlantic<\/strong> to the Pacific Ocean<\/strong>. The movement of passenger trains<\/strong> is\nequivalent to dispatching thirty-seven trains<\/strong> per day around the world,\nand the freight train movement<\/strong> is in like manner<\/strong> equal to dispatching\nfifty-three trains<\/strong> a day around the world. Add<\/strong> to this the railway\nbusiness controlled by other countries<\/strong>, and one gets some idea of how\nfar the stage-coach<\/strong> has been left behind.<\/phrase>","many hundreds<\/word>","new meridian<\/word>","order<\/word>","stirring elements<\/word>","backward run<\/word>","many milestones<\/word>","count<\/word>","disappear<\/word>","telephone<\/word>","electric railways<\/word>","electric lights<\/word>","sewing machine<\/word>","india-rubber goods<\/word>","snap-shot cameras<\/word>","octuple web<\/word>","printing press<\/word>","insignificant prototype<\/word>","To-day we eat supper in one city, and breakfast in another so many hundreds<\/strong> of miles east or west as\nto be compelled to set our watches to the new meridian<\/strong> of longitude in\norder<\/strong> to keep our engagement. But railroads and steam-cars constitute\nonly one of the stirring elements<\/strong> of modern civilization<\/strong>. As we make the\nbackward run<\/strong> of one hundred years we have passed by many milestones<\/strong> of\nprogress. Let us see if we can count<\/strong> some of them as they disappear<\/strong>\nbehind us. We quickly lose the telephone<\/strong>, phonograph and graphophone. We\nno longer see the cable-cars or electric railways<\/strong>. The electric lights<\/strong>\nhave gone out. The telegraph disappears. The sewing machine<\/strong>, reaper, and\nthresher have passed away, and so also have all india-rubber goods<\/strong>. We\nno longer see any photographs, photo-engravings, photolithographs, or\nsnap-shot cameras<\/strong>. The wonderful octuple web<\/strong> perfecting printing press<\/strong>;\nprinting, pasting, cutting, folding, and counting newspapers at the rate\nof 96,000 per hour, or 1,600 per minute, shrinks at the beginning of the\ncentury into an insignificant prototype<\/strong>.<\/phrase>","wood-working machinery<\/word>","endless variety<\/word>","unlimited variety<\/word>","passenger elevators<\/word>","asphalt pavement<\/word>","fire<\/word>","triple-expansion steam engine<\/word>","Giffard<\/word>","celluloid articles<\/word>","barbed wire fences<\/word>","time<\/word>","self-binding harvesters<\/word>","gas wells<\/word>","ice machines<\/word>","air engines<\/word>","stem-winding watches<\/word>","great suspension bridges<\/word>","iron frame buildings<\/word>","heavy ironclads<\/word>","magazine guns<\/word>","Gatling<\/word>","linotype machines<\/word>","practical typewriters<\/word>","disease germs<\/word>","sanitary plumbing<\/word>","water<\/word>","soda water fountains<\/word>","air brakes<\/word>","coal-tar dyes<\/word>","electric machines<\/word>","aluminum ware<\/word>","Bessemer<\/word>","wonderful developments<\/word>","iron ware<\/word>","Welsbach<\/word>","gas burners<\/word>","cigarette machine<\/word>","hydraulic dredges<\/word>","roller mills<\/word>","middlings purifiers<\/word>","patent-process flour<\/word>","air drills<\/word>","dynamite gun<\/word>","McKay<\/word>","shoe machine<\/word>","circular knitting machine<\/word>","Jacquard<\/word>","wood pulp<\/word>","fire alarms<\/word>","use<\/word>","street sweepers<\/word>","Artesian<\/word>","friction matches<\/word>","nail machines<\/word>","false teeth<\/word>","artificial limbs<\/word>","Kinetoscope<\/word>","acetylene gas<\/word>","X-ray apparatus<\/word>","horseless carriages<\/word>","We lose all planing and wood-working machinery<\/strong>, and with it the endless variety<\/strong> of sashes,\ndoors, blinds, and furniture in unlimited variety<\/strong>. There are no\ngas-engines, no passenger elevators<\/strong>, no asphalt pavement<\/strong>, no steam fire<\/strong>\nengine, no triple-expansion steam engine<\/strong>, no Giffard<\/strong> injector, no\ncelluloid articles<\/strong>, no barbed wire fences<\/strong>, no time<\/strong>-locks for safes, no\nself-binding harvesters<\/strong>, no oil nor gas wells<\/strong>, no ice machines<\/strong> nor cold\nstorage. We lose air engines<\/strong>, stem-winding watches<\/strong>, cash-registers and\ncash-carriers, the great suspension bridges<\/strong>, and tunnels, the Suez\nCanal, iron frame buildings<\/strong>, monitors and heavy ironclads<\/strong>, revolvers,\ntorpedoes, magazine guns<\/strong> and Gatling<\/strong> guns, linotype machines<\/strong>, all\npractical typewriters<\/strong>, all pasteurizing, knowledge of microbes or\ndisease germs<\/strong>, and sanitary plumbing<\/strong>, water<\/strong>-gas, soda water fountains<\/strong>,\nair brakes<\/strong>, coal-tar dyes<\/strong> and medicines, nitro-glycerine, dynamite and\nguncotton, dynamo electric machines<\/strong>, aluminum ware<\/strong>, electric\nlocomotives, Bessemer<\/strong> steel with its wonderful developments<\/strong>, ocean\ncables, enameled iron ware<\/strong>, Welsbach<\/strong> gas burners<\/strong>, electric storage\nbatteries, the cigarette machine<\/strong>, hydraulic dredges<\/strong>, the roller mills<\/strong>,\nmiddlings purifiers<\/strong> and patent-process flour<\/strong>, tin can machines, car\ncouplings, compressed air drills<\/strong>, sleeping cars, the dynamite gun<\/strong>, the\nMcKay<\/strong> shoe machine<\/strong>, the circular knitting machine<\/strong>, the Jacquard<\/strong> loom,\nwood pulp<\/strong> for paper, fire alarms<\/strong>, the use<\/strong> of an\u00e6sthetics in surgery,\noleomargarine, street sweepers<\/strong>, Artesian<\/strong> wells, friction matches<\/strong>, steam\nhammers, electro-plating, nail machines<\/strong>, false teeth<\/strong>, artificial limbs<\/strong>\nand eyes, the spectroscope, the Kinetoscope<\/strong> or moving pictures,\nacetylene gas<\/strong>, X-ray apparatus<\/strong>, horseless carriages<\/strong>, and--but, enough!\nthe reader exclaims, and indeed it is not pleasant to contemplate the\nloss.<\/phrase>","negative conditions<\/word>","extend<\/word>","stop<\/word>","potent factors<\/word>","The negative conditions<\/strong> of that period extend<\/strong> into such an\nappalling void that we stop<\/strong> short, shrinking from the thought of what it\nwould mean to modern civilization<\/strong> to eliminate from its life these\npotent factors<\/strong> of its existence.<\/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':222, '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':222, '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':222, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }