javascript - Konami code changing every color -
okay want change websites colors on press of button. have code:
$( window ).konami({ code : [38,38], // up cheat: function() { $('*').filter(function() { var match = 'rgb(255, 165, 0)'; // match background-color: black /* true = keep element in our wrapped set false = remove element our wrapped set */ return ( $(this).css('color') == match ); }).css('color', 'purple'); // change background color of black spans } });
now problem want add bunch of other attributes background-color, border-color , active , hover color - though these 2 might problematic code snippet think.
any adding named attributes fray welcomed - i'm not javascript expert no means.
also bonus question webpage on angularjs , when used konami code, seems work on colors on display. on different pages have enter keys again. simple workaround or gotta deal it?
Comments
Post a Comment