Created
March 27, 2017 12:52
-
-
Save ka05/39531da2c094c6e4fbcf14c3b07c8bc6 to your computer and use it in GitHub Desktop.
Script to obtain background image from chrome extension called momentum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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