Please see Patrick330's fork of this script.
ClassDojo changes their site regularly, so a script like this needs regular maintenance. I have decided to archive this project and stop providing updates. Patrick330's fork linked above may be a good alternative.
ClassDojo is a classroom communication app used to share reports between parents and teachers. Teachers track student behavior and upload photos or videos. The gamification style system teaches developmental skills through real-time feedback.
When your child's teacher shares a photo, it goes on your parent "storyline". Unfortunately, ClassDojo does not provide any means of saving these photos. In fact, the photos are displayed in a <div>
using style: background-image('...');
so right-clicking and choosing "Save image" is not an option.
I've taken another look, and @Coopersweb and @trunkspacehosting are right - it only downloads only the first photo. The result is the same whether you use my script or @fboulet's modification. It's very possible that this has always been the case, and that only @fboulet's modification made it noticeable.
I couldn't really seem to figure out how to identify the URLs of subsequent photos. I'm a developer, but not in JavaScript, and the minified and obfuscated code is challenging to interpret. I set an event listener on the click function and stepped through the code, and it appears that the photo URLs are buried within a long array of functions inside a webpack.
I decided to try another approach. The code now loops through each story item and "clicks" to advance through the set of photos. It also downloads videos story by story, so that process should be more robust. In addition I added some date parsing enable the failes to be saved with sortable data.
Hope this works for you!