Skip to content
Permalink
Browse files

Fix #25 JS Comments Syntax

Thanks @stell
  • Loading branch information...
nielsnuebel committed May 24, 2018
1 parent 3a1362f commit 8c8057342e6a7164c39dfc81fc0e33958e65259c
Showing with 18 additions and 18 deletions.
  1. +15 −15 kickgdpr.php
  2. +1 −1 kickgdpr.xml
  3. +2 −2 update.xml
@@ -108,17 +108,17 @@ public function onBeforeCompileHead()
$js[] = "";
$js[] = "var disableStr = 'ga-disable-" . $ga_code . "';";
$js[] = "";
$js[] = "/* Function to detect opted out users */";
$js[] = "// Function to detect opted out users";
$js[] = "function __kickgaTrackerIsOptedOut() {";
$js[] = " return document.cookie.indexOf(disableStr + '=true') > -1;";
$js[] = "};";
$js[] = "";
$js[] = "/* Disable tracking if the opt-out cookie exists. */";
$js[] = "// Disable tracking if the opt-out cookie exists.";
$js[] = "if ( __kickgaTrackerIsOptedOut() ) {";
$js[] = " window[disableStr] = true;";
$js[] = "};";
$js[] = "";
$js[] = "/* Disable tracking if do not track active. */";
$js[] = "// Disable tracking if do not track active.";
$js[] = "if (navigator.doNotTrack == 1) {";
$js[] = " window[disableStr] = true;";
$js[] = "};";
@@ -203,7 +203,7 @@ public function onBeforeCompileHead()
}
$js = array();
$js[] = '<!-- Start Cookie Alert -->';
$js[] = '// Start Cookie Alert';
$js[] = 'window.addEventListener("load", function(){';
$js[] = 'window.cookieconsent.initialise({';
$js[] = ' "palette": {';
@@ -254,7 +254,7 @@ public function onBeforeCompileHead()
$js[] = ' }';
$js[] = '})});';
$js[] = "<!-- End Cookie Alert -->";
$js[] = "// End Cookie Alert";
$js[] = "function handleCookies(status){";
if ($type != '' && $type == 'opt-out')
@@ -270,7 +270,7 @@ public function onBeforeCompileHead()
// Add Google Analytics to Head
if ($ga_code && !$this->params->get('disable_ga', false))
{
$js[] = " <!-- Google Analytics -->";
$js[] = " // Google Analytics";
$js[] = " if (!window[disableStr]) {";
$js[] = " (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){";
$js[] = " (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),";
@@ -300,14 +300,14 @@ public function onBeforeCompileHead()
$js[] = " __kickgaTracker('send', 'pageview');";
$js[] = " }";
$js[] = " <!-- End Google Analytics -->";
$js[] = " // End Google Analytics";
$js[] = "";
}
// Add Facebook Pixel Code to Head
if ($pixel_id && !$this->params->get('disable_facebook', false))
{
$js[] = " <!-- Facebook Pixel Code -->";
$js[] = " // Facebook Pixel Code";
$js[] = " !function(f,b,e,v,n,t,s)";
$js[] = " {if(f.fbq)return;n=f.fbq=function(){n.callMethod?";
$js[] = " n.callMethod.apply(n,arguments):n.queue.push(arguments)};";
@@ -318,25 +318,25 @@ public function onBeforeCompileHead()
$js[] = " 'https://connect.facebook.net/en_US/fbevents.js');";
$js[] = " fbq('init', '" . $pixel_id . "');";
$js[] = " fbq('track', 'PageView');";
$js[] = " <!-- End Facebook Pixel Code -->";
$js[] = " // End Facebook Pixel Code";
$js[] = "";
}
// Add Custom Code from Plugin Params to Head
if ($customcode && $customcode != '')
{
$js[] = ' <!-- Custom Code -->';
$js[] = ' // Custom Code';
$js[] = ' ' . $customcode;
$js[] = ' <!-- End Custom Code -->';
$js[] = ' // End Custom Code';
}
// Add Custom Code from Plugin Trigger onKickGDPR to Head
$trigger_content = $this->trigger_content;
if ($trigger_content && $trigger_content != '')
{
$js[] = ' <!-- Plugin Trigger Code -->';
$js[] = ' // Plugin Trigger Code';
$js[] = ' ' . $trigger_content;
$js[] = ' <!-- End Plugin Trigger Code -->';
$js[] = ' // End Plugin Trigger Code';
}
// $js[] = 'PUT your Code here';
@@ -369,9 +369,9 @@ public function onBeforeCompileHead()
{
$customcssarray = array();
$customcssarray[] = '';
$customcssarray[] = '/* Custom CSS */';
$customcssarray[] = '// Custom CSS';
$customcssarray[] = $customcss;
$customcssarray[] = '/* End Custom CSS */';
$customcssarray[] = '// End Custom CSS';
$customcssarray[] = '';
$headcss = implode("\n", $customcssarray);
@@ -7,7 +7,7 @@
<license>GNU General Public License version 3 or later; see LICENSE.txt</license>
<authorEmail>info@kicktemp.com</authorEmail>
<authorUrl>www.kicktemp.com</authorUrl>
<version>2.2.1</version>
<version>2.2.2</version>
<description>PLG_SYSTEM_KICKGDPR_XML_DESCRIPTION</description>
<files>
<folder>language</folder>
@@ -7,10 +7,10 @@
<type>plugin</type>
<folder>system</folder>
<client>0</client>
<version>2.2.1</version>
<version>2.2.2</version>
<infourl title="KickGDPR Plugin">https://github.com/nielsnuebel/kickgdpr/</infourl>
<downloads>
<downloadurl type="upgrade" format="zip">https://github.com/nielsnuebel/kickgdpr/archive/2.2.1.zip</downloadurl>
<downloadurl type="upgrade" format="zip">https://github.com/nielsnuebel/kickgdpr/archive/2.2.2.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>

0 comments on commit 8c80573

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.