Chrome Extension to Autoplay the ATLS online Training Lectures

Christopher Rock
5 min readFeb 18, 2021

It was exciting to get an e-mail from the coordinator for the Advanced Trauma Life Support (ATLS) course at the nearby Army Health Center saying they had a last minute opening.

“You have been enrolled in the Advanced Trauma Life Support (ATLS) Course at Madigan. This course, originally scheduled for 16–17FEB2021, has been converted to two 1-day “hybrid” courses to maintain smaller class sizes and to meet social distancing requirements.”

Your in-class day is …” only a couple weeks! In the meantime I was already struggling to keep up with the daily drivel of Naval Medical Officer life (see also: How to Excel in a Military Bureaucracy, pages 32–36.

American College of Surgeons Logo

Like any self-respecting certification, this one had moved online. What used to be a two or three day in-person classroom program is now squished into a single day of training! Of course, we are still responsible for the material as if we had spent the 3days going over it — only now one must complete the didactic part on their own, after hours, between patients, etc… I’m sure some O6 has earned him or herself a grand promotional star by selling this idea as “recaptured 300% of working person-hours” — ensuring any and all of our free time is taken up by online trainings. Because (heaven forbid!) we have adequate time blocked off for training. But I digress.

To add insult to injury, the fine folks with the College of Surgeons had contracted a software company that created a training that paused every 15–30 seconds, waiting on each slide for you to click the “play” button to advance. Sunday night the week of the training found me in the call room, trying to figure out how to get through these trainings as quickly as possible.

One script to skip them all.

On the plus side, the training had been created with a large part exposed via HTML and CSS. From Chrome I was able to inspect the Play button, and a little trial and error later found me chugging through the trainings, sans delays! If you are in the same pickle, here’s the code you can use to solve the same problem:

To run this script, you can just right click on the page of the training module and go down to the inspect menu. Then select the console, and just copy and past the above code into the console area. Voila! The module will click through, stopping at questions.

Step 1) Right click and choose “Inspect”
Step 2) Click “Console,” then 3) Copy and paste code above and hit Enter

Make sure when you get to a question, you hit submit (not skip!), then wait for the correct answer and click submit again. This ensures you get credit for actually going through the module.

Here is a question which you must answer (or at least hit the submit button).

Make sure when you get to a question, you hit submit!

After each module I do recommend you complete the quiz as you normally would. This helps to clue you in on test topics.

In order for the above code to work, you’ll have to add it (right-click, inspect, console, paste) to the inspector every time a new module opens. Don’t want to keep on pasting this code into every lesson? You can also easily create a Chrome extension that you enable when you want to do the training. You may not find this is really worth your time, but it’s a fun project to learn about how extensions work.

Making it into a Chrome extension.

First, save the above code into a new directory. Call the file mATLS-autoplay.js. Now create another file in that same directory called manifest.json. This file is a sort of configuration file for the Chrome extension. Paste the below json into manifest.json:

In addition to giving this extension a name, this manifest file sets the following configuration options:

  • Use icon-16.png as the extension icon.
  • Only runs our extension on pages that start with “https://learning.facs.org/sites”. In my bare-bones testing, all the lecture content wasserved from these pages.
  • Use the file “mATLS-autoplay.js” as a javascript source.
  • Exclude pages that have the word “quiz” because we don’t want to skip the quizzes.

Last thing you need to add to the directory is an icon. In the manifest.json file above we called it “icon-16.png”. You can create your own, or just use this one that I screen captured from a random icon-website and downsampled to a 16x16 size:

icon-16.png

To recap: We have a directory with three files, manifest.json, mATLS-autoplay.js, and icon-16.png. Last step, you’re ready to load it into Chrome as an extension. In your address bar go to chrome://extensions/ and you should see the Developer Mode switch in the upper right. Turn it on. Now click the Load Unpacked button in the upper left. Navigate to the directory where you saved the above three files and hit Select. That’s it! You should see the extension added in below.

mATLS PebbleSpot Autoplay Extension tile as seen in Chrome

You’re Done! Every time you load a training module this script will automatically click through until it gets to a question. Once you are done with training, you can remove or disable the extension. Now go power through the modules so you can be current with your ATLS requirement!!

--

--