Sun image:
I really love space and astronomy pictures and for about 10 or 15 years I've had APOD as my home page! But I don't specifically see my homepage that much anymore and I've been missing out on my APOD fix.
So what did I do??? I built an extension to show me an APOD on every new tab I open!
This extension might seem like a lot of work for such a simple purpose. This is not by accident, I set out to build the best APOD viewing extension that I could think of and if you think there's something that could be added to make this better I can't wait to hear from you!
Your New Tab page will now be the Astronomy Picture of the Day (APOD)! Your top sites are shown in the top left of the page to maintain some usefulness from the default new tab screen.
- Save your favorite APOD's for viewing again with the "Save Favorites" button at the bottom right.
- Click the date in the title bar to display a
date selector
.
- Use the options in the Chrome menu bar to set
Today
or aRandom
APOD on new tab. - High definition photos only. Each APOD has a standard-res and hi-res image, initially the hi-res image is attempted to be shown but if the file size is too large (takes too long to download) it'll default to the standard resolution image. This setting will force high resolution photos only.
- Toggle showing your Top sites, or hide them to focus on the space pics.
- Toggle showing your viewing history bar which is shown at the bottom of the page.
- Enable the ability to see
Todays
APOD a certain number of times before arandom
photo is selected. This allows you to see the most recent APOD a few times and then move onto some new pictures (thanks Hambly!).
- Random APOD -
r
- Today's APOD -
t
- Previous Day APOD -
j
- Next Day APOD -
k
- Toggle Explanation -
e
- Toggle Favorites -
f
- Toggle Search -
s
- Previous History -
left-arrow
- Next History -
right-arrow
If you want to fork, develop and build this extension locally then follow these steps:
-
Fork/Download the repository and using the terminal navigate to the directory.
-
Build the dependencies by running
yarn
ornpm install
(Yarn is recommended). -
For active development you must re-build the extension after changes are made using
yarn build
. -
Add the unpacked extension in Chrome (after running
yarn watch
oryarn build
). Do this by opening up the Chrome preferences:- On the left sidebar click
extensions
(or just navigate directly tochrome://extensions/
). - Make sure
Developer mode
is activated in the top right of the page. - Select
Load Unpacked
at the top left of the page, navigate to thebuild
folder inside the project directory. Go open a new tab in Chrome and you'll now be running the development version.
- On the left sidebar click
-
Again, you must re-run
yarn build
after every save of the files for them to show up.
- Firefox has issued a warning for the use of
innerHTML
which is performed one time to avoid more widespread use. This single use is done inside a wrapper element and has been reviewed to avoid becoming an injection vector.
-
axios - This is strictly used for ajax calls to the NASA API.
-
Additional dependencies are considered well known sources as they all pertain to the use of webpack (i.e. babel, uglifyJS, path, etc.)