Skip to content

Instantly share code, notes, and snippets.

@jaredhirsch
Created June 27, 2014 20:09
Show Gist options
  • Save jaredhirsch/8b1e2f0743d953a3c638 to your computer and use it in GitHub Desktop.
Save jaredhirsch/8b1e2f0743d953a3c638 to your computer and use it in GitHub Desktop.
gaia hackin 4 the lulz
// do this to make your homescreen background a sweet gif
// someplace inside homescreen app
document.addEventListener('visibilitychange', function yay_gifs() {
if (document.hidden) { return; }
// might not even need the setTimeout, dunno how timing works
// with homescreen blob generation
setTimeout(function() {
document.body.style.cssText = 'background: url("http://media.giphy.com/media/rriYfsQZRE9Pi/giphy.gif")'
})
})
// same deal, but for lockscreen
// needs to execute from inside system
document.addEventListener('visibilitychange', function yay_gifz() {
if (document.hidden) { return; }
setTimeout(function() {
var lockScreenBgd = document.getElementById('lockscreen-background');
lockScreenBgd.style.cssText = 'background: url("http://media.giphy.com/media/rriYfsQZRE9Pi/giphy.gif")'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment