Commit 6c2e09e1fcfaaeb625e3b0943edfee2c48a2f519

Authored by Ábner Silva de Oliveira
1 parent 5220cddb

trying to avoid the blink effect where restoring high contrast after navigation

Showing 2 changed files with 7 additions and 4 deletions   Show diff stats
header.rhtml
  1 +<script type='text/javascript'>
  2 +(function($) {
  3 + if($.cookie("high_contrast") === 'true'){
  4 + $( "body" ).toggleClass( "contraste" );
  5 + }
  6 +})(jQuery);
  7 +</script>
1 8 <div id="barra-brasil">
2 9 <a href="http://brasil.gov.br" style="background:#7F7F7F; height: 20px; padding:4px 0 4px 10px; display: block; font-family:sans,sans-serif; text-decoration:none; color:white; ">Portal do Governo Brasileiro</a>
3 10 </div>
... ...
theme.js
1 1 (function($) {
2 2  
3 3 // Run code
4   - if($.cookie("high_contrast") === 'true'){
5   - $( "body" ).toggleClass( "contraste" );
6   - }
7   -
8 4 $( "#siteaction-contraste a" ).click(function() {
9 5 $( "body" ).toggleClass( "contraste" );
10 6 if($('body').hasClass('contraste')){
... ...