Commit c836db01 authored by Sven Berg Ryen's avatar Sven Berg Ryen Committed by Sven Berg Ryen
Browse files

Issue #3309004 by svenryen, beg76: Problem with excluded script loading and categories

parent 8019d35b
Loading
Loading
Loading
Loading
+2 −2
Changes for eu_cookie_compliance.module: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -504,7 +504,7 @@ function eu_cookie_compliance_page_build(&$page) {
        if (substr($script, 0, 4) !== 'http' && substr($script, 0, 2) !== '//') {
          $script = '/' . $script;
        }
        if ($category) {
        if ($category !== NULL) {
          $load_disabled_scripts .= 'if (category === "' . $category . '") {';
        }
        $load_disabled_scripts .= 'var scriptTag = document.createElement("script");';
@@ -515,7 +515,7 @@ function eu_cookie_compliance_page_build(&$page) {
        if ($attach_name) {
          $load_disabled_scripts .= 'var EUCookieInterval' . $attach_name . '= setInterval(function() { if (Drupal.behaviors.' . $attach_name . ' !== undefined) { Drupal.behaviors.' . $attach_name . '.attach(document, Drupal.settings);clearInterval(EUCookieInterval' . $attach_name . ')};}, 100);';
        }
        if ($category) {
        if ($category !== NULL) {
          $load_disabled_scripts .= '}';
        }
      }