Last active
June 20, 2018 20:22
-
-
Save ReallyNotARussianSpy/60448ae9d16c7268e83bdcac97c3f16b to your computer and use it in GitHub Desktop.
Miles Finch User Script
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
// ==UserScript== | |
// @name Miles Finch | |
// @namespace https://dynamiccatholic.com/ | |
// @version 1.0 | |
// @description try to take over the world! | |
// @author You | |
// @include * | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @updateURL https://gist.githubusercontent.com/AdJesumPerMariam/60448ae9d16c7268e83bdcac97c3f16b/raw/miles_finch.js | |
// ==/UserScript== | |
(function() { | |
jQuery.noConflict(); | |
jQuery(function ($) { | |
var keyCodes = [], konamiString = "38,38,40,40,37,39,37,39,66,65"; | |
$(document).keydown(function(e) { | |
keyCodes.push( e.keyCode ); | |
if (keyCodes.toString().indexOf(konamiString) >= 0){ | |
keyCodes = []; | |
var finch = ['https://i.imgur.com/pgYH9Df.jpg', 'https://i.imgur.com/IuauwRf.jpg', 'https://i.imgur.com/k0q8Bue.jpg', 'https://i.imgur.com/nq36m0X.jpg', 'https://i.imgur.com/5sGOBir.jpg']; | |
$('img').each(function() { | |
$('picture source').remove(); | |
$(this).prop('src', finch[Math.floor(Math.random() * finch.length)]); | |
}); | |
$('*').filter(function() { | |
return $(this).css('background-image') != 'none'; | |
}).each(function() { | |
this.style.setProperty('background-image', 'url("' + finch[Math.floor(Math.random() * finch.length)] + '")', 'important'); | |
}); | |
} | |
}); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment