Difference between revisions of "MediaWiki:Common.js"

From CPKB - Cell Phone Knowledge Base
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: <!-- Begin Cookie Consent plugin by Silktide - http://silktide.com/cookieconsent --> <script type=...")
 
Line 2: Line 2:
  
  
<!-- Begin Cookie Consent plugin by Silktide - http://silktide.com/cookieconsent -->
+
    <script src="/PATH_TO_COOKIE_CONTROL/cookieControl-7.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
+
    <script type="text/javascript">//<![CDATA[
    window.cookieconsent_options = {"message":"This website uses cookies to ensure you get the best experience on our website","dismiss":"Got it!","learnMore":"More info","link":null,"theme":"light-floating"};
+
      cookieControl({
</script>
+
          t: {
 
+
              title: '<p>This site uses cookies to store information on your computer.</p>',
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.9/cookieconsent.min.js"></script>
+
              intro: '<p>Some of these cookies are essential to make our site work and others help us to improve by giving us some insight into how the site is being used.</p>',
<!-- End Cookie Consent plugin -->
+
              full:'<p>These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking some simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of this site. If you\'re not happy with this, we won\'t set these cookies but some nice features on the site may be unavailable.</p><p>To control third party cookies, you can also <a class="ccc-settings" href="browser-settings" target="_blank">adjust your browser settings.</a></p><p>By using our site you accept the terms of our <a href="http://www.cpkb.org/wiki/CPKB_-_Cell_Phone_Knowledge_Base:Privacy_policy">Privacy Policy</a>.</p>'
 +
          },
 +
          position:CookieControl.POS_RIGHT,
 +
          style:CookieControl.STYLE_TRIANGLE,
 +
          theme:CookieControl.THEME_LIGHT, // light or dark
 +
          startOpen:true,
 +
          autoHide:7000,
 +
          subdomains:true,
 +
          protectedCookies: [], //list the cookies you do not want deleted, for example ['analytics', 'twitter']
 +
          apiKey: 'e2828fbac3a74e66b151fb91f4697073d9a0bc22',
 +
          product: CookieControl.PROD_FREE,
 +
          consentModel: CookieControl.MODEL_INFO,
 +
          onAccept:function(){},
 +
          onReady:function(){},
 +
          onCookiesAllowed:function(){},
 +
          onCookiesNotAllowed:function(){}
 +
          });
 +
      //]]>
 +
    </script>

Revision as of 21:50, 27 March 2016

/* Any JavaScript here will be loaded for all users on every page load. */


    <script src="/PATH_TO_COOKIE_CONTROL/cookieControl-7.0.min.js" type="text/javascript"></script>
    <script type="text/javascript">//<![CDATA[
      cookieControl({
          t: {
              title: '<p>This site uses cookies to store information on your computer.</p>',
              intro: '<p>Some of these cookies are essential to make our site work and others help us to improve by giving us some insight into how the site is being used.</p>',
              full:'<p>These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking some simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of this site. If you\'re not happy with this, we won\'t set these cookies but some nice features on the site may be unavailable.</p><p>To control third party cookies, you can also <a class="ccc-settings" href="browser-settings" target="_blank">adjust your browser settings.</a></p><p>By using our site you accept the terms of our <a href="http://www.cpkb.org/wiki/CPKB_-_Cell_Phone_Knowledge_Base:Privacy_policy">Privacy Policy</a>.</p>'
          },
          position:CookieControl.POS_RIGHT,
          style:CookieControl.STYLE_TRIANGLE,
          theme:CookieControl.THEME_LIGHT, // light or dark
          startOpen:true,
          autoHide:7000,
          subdomains:true,
          protectedCookies: [], //list the cookies you do not want deleted, for example ['analytics', 'twitter']
          apiKey: 'e2828fbac3a74e66b151fb91f4697073d9a0bc22',
          product: CookieControl.PROD_FREE,
          consentModel: CookieControl.MODEL_INFO,
          onAccept:function(){},
          onReady:function(){},
          onCookiesAllowed:function(){},
          onCookiesNotAllowed:function(){}
          });
       //]]>
    </script>