Board Thread:General Coding Help/@comment-4356266-20161114141721/@comment-24473195-20161114192711

Nice little script. I'd just suggest that you add a check before attempting to grab the image:

if (d.query.pages[wat].imageinfo) { var url = d.query.pages[wat].imageinfo["0"].thumburl;

Currently, it will just show an error if the imageinfo parameter somehow doesn't show up.