Code used to autumnify CNN's topic headers. Try this in your JavaScript console on CNN. https://github.com/nluqo/autumn This code is waaaay more complicated than normal Autumn use (loading scripts and such), so please don't be put off by that.
This file contains 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
function autumnify(){jQuery.getScript("//rawgithub.com/boronine/husl/v2.0.0/husl.js", function(){jQuery.getScript("//rawgithub.com/nluqo/autumn/master/autumn.js", function(){jQuery(".cnn_sectbincntnt2 h4").each(function(i,e){jQuery.fn.autumn.init({colorProfile:'dark'});var g = jQuery.fn.autumn.getGradientColors(i);jQuery(this).css({'background-image':'linear-gradient(to top, '+g[1]+','+g[0]+')'});});});});}if(!window.hasOwnProperty('jQuery')){var s = document.body.appendChild(document.createElement('script')); s.src = '//code.jquery.com/jquery-1.10.1.min.js';s.onload = autumnify;}else{autumnify();} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment