/*
 * This file is part of the WordPress Standard project.
 *
 * Copyright (c) 2015-2016 LIN3S <info@lin3s.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @author Gorka Laucirica <gorka.lauzirika@gmail.com>
 * @author Beñat Espiña <bespina@lin3s.com>
 */

'use strict';

(function ($) {

  var $allLinks = $('a, button, .cookies__actions .button'),
    $window = $(window),
    scrollTop = 400;

  if (!localStorage.getItem('cookies')) {
    $('.cookies').addClass('cookies--visible');
  }

  function acceptCookies() {
    localStorage.setItem('cookies', true);
    $('.cookies').removeClass('cookies--visible');
  }

  $allLinks.click(function () {
    acceptCookies();
  });

  $window.on('scroll', function () {
    if (typeof window.requestAnimationFrame !== 'undefined') {
      if ($(this).scrollTop() > scrollTop) {
        window.requestAnimationFrame(acceptCookies);
      }
    } else {
      if ($(this).scrollTop() > scrollTop) {
        acceptCookies();
      }
    }
  });

}(jQuery));

@@ -982,24 +982,16 @@
  %7D else 
-%7B%0A      
 if ($(th
@@ -1027,18 +1027,16 @@
 %7B%0A      
-  
 acceptCo
@@ -1044,24 +1044,16 @@
 kies();%0A
-      %7D%0A
     %7D%0A  

Delete not needed nested block