Skip to content

Instantly share code, notes, and snippets.

@ka05
Created March 27, 2017 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ka05/39531da2c094c6e4fbcf14c3b07c8bc6 to your computer and use it in GitHub Desktop.
Save ka05/39531da2c094c6e4fbcf14c3b07c8bc6 to your computer and use it in GitHub Desktop.
Script to obtain background image from chrome extension called momentum
// If you have the chrome extension, called momentum you will notice the background changes daily and you may want to save these backgrounds
// Below is the link to this chrome extension.
// https://chrome.google.com/webstore/detail/momentum/laookkfknpbbblfpciffpaejjkokdgca?hl=en
// You can use this simple code to get the background image.
var backgroundString = $('#background').find('li').attr('style');
var backgroundURL = backgroundString.substring(backgroundString.indexOf("(")+2, backgroundString.indexOf(")")-1);
window.location = backgroundURL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment