From 24f7965045df8d6eca7f94090c384c8f84406f3f Mon Sep 17 00:00:00 2001 From: Melissa Wen Date: Wed, 11 Nov 2015 11:06:27 -0200 Subject: [PATCH] Re-include high contrast js --- theme.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+), 0 deletions(-) create mode 100644 theme.js 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