Skip to content

Instantly share code, notes, and snippets.

View ka05's full-sized avatar

Clayton Herendeen ka05

  • Envative
  • United States
View GitHub Profile
@ka05
ka05 / momentum_background_fetcher_script.js
Created March 27, 2017 12:52
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;