I’m part of digital-only secret Santa exchange. It’s a cool idea…you’re assigned someone you may (or may not know) and tasked with coming up with a free (or very cheap, ~$5) digital gift. Some ideas were things like creating customized Spotify playlists or blog lists, creative portraits of the person from images you find online, to recipe or book suggestions.
After snooping out my person, I found that they really like being outside, but they’re a programmer by day. So, I decided to throw together a little Chrome/Firefox extension which replaces their new tab page with a randomly-found picture from Flickr.
Originally, I hardcoded tags that would always return an image of a forest. I decided that wasn’t much fun. What if they wanted to look at a beach that day?
So, I tapped into Chrome and Firefox local storage. You can input some tags (comma separated) into a simple form and hey presto! The image changes. It will use those tags with each new tab load until you change the tags.
I’m pulling the large image (1600px on the longest side) and every now and then an image fails to load. I don’t know of a good way to preprocess for missing image URLs yet. Plus, I did this in a two-day blitz. In good fashion, each photo is linked to the original file in Flickr at the bottom of the screen so you can go and give it a fav if you’re a Flickr user.
If you want to try it out you can download this zip holding both extension files.
chrome:extensionsin the address bar.
Make sure the “Developer Mode” checkbox is selected.
Click on “Load unpacked extension” and select the folder you downloaded.
Enable it and then open a new tab. You’ll need to set the tags the first time.
about:addonsin the address bar.
Click on the gear icon (top right) and select “Install Add-On From File…”
.xpifile from your download and enable it in the popup.
Open a new tab and set your keywords.
Featured image is a screenshot of the extension which is showing Crowded summer beach. High angle view flickr photo by slon.pics shared into the public domain using Creative Commons Public Domain Dedication (CC0)