diff --git a/theme.js b/theme.js new file mode 100644 index 0000000..6ac9e21 --- /dev/null +++ b/theme.js @@ -0,0 +1,14 @@ +jQuery( document ).ready(function( $ ) { + // Run code + if($.cookie("high_contrast") === 'true'){ + $( "body" ).toggleClass( "contraste" ); + } + $( "#siteaction-contraste a" ).click(function() { + $( "body" ).toggleClass( "contraste" ); + if($('body').hasClass('contraste')){ + $.cookie('high_contrast', 'true', {path: '/'}); + } else { + $.cookie('high_contrast', null, { path: '/' }); + } + }); +}); -- libgit2 0.21.2