Actions

Snowdenize

From Trammell Hudson's Projects

Snowdenize all animated GIFs

This chrome userscript "Makes it Snow!" by replacing all (animated) GIFs with "Sexy Snowden", inspired by s t e p h's tweet:

@carolinesinders browser plugin that replaces all gifs with sexy snowden

— s t e p h (@corcra) January 27, 2016

// ==UserScript==
// @name Snowdenize All Images
// @namespace net.trmm.snowdenize
// @author Trammell Hudson <hudson@trmm.net>
// @include *
// @Grant       none
// @version 2
// ==/UserScript==

var snowden = 'https://media.giphy.com/media/l0NwuLOY7KkpCERSo/giphy.gif';

window.setInterval(function() {
for(var i = 0 ; i < document.images.length ; i++)
{
        var match = /\.gif/.exec(document.images[i].src);
        if (match)
                document.images[i].src = snowden;
}
}, 1000);

Save this as snowden.user.js and drag it into [chrome://extensions chrome://extensions]. If you want to replace all images, just delete the two lines that attempt to match only GIFs. As a caveat, I don't know how to program anything in Javascript and there are likely significantly better ways to do this sort of thing.