1document.write('.'); 2 3 4// VANAF HIER 5 6var jsReadyCB = function(){ 7/* 8 * Copyright (C) 2012 PrimeBox ([email protected]) 9 * 10 * This work is licensed under the Creative Commons 11 * Attribution 3.0 Unported License. To view a copy 12 * of this license, visit 13 * http://creativecommons.org/licenses/by/3.0/. 14 * 15 * Documentation available at: 16 * http://www.primebox.co.uk/projects/cookie-bar/ 17 * 18 * When using this software you use it at your own risk. We hold 19 * no responsibility for any damage caused by using this plugin 20 * or the documentation provided. 21 * 22 * THERE HAVE BEEN MADE CHANGES IN THIS DISTRIBUTION WHICH WERE NOT MADE BY THE ORIGINAL CREATORS 23 * 24 */ 25(function($){ 26 $.cookieBar = function(options,val){ 27 if(options=='cookies'){ 28 var doReturn = 'cookies'; 29 }else if(options=='set'){ 30 var doReturn = 'set'; 31 }else{ 32 var doReturn = false; 33 } 34 var defaults = { 35 message: 'We use cookies to track usage and preferences.', //Message displayed on bar 36 acceptButton: true, //Set to true to show accept/enable button 37 acceptText: 'I Understand', //Text on accept/enable button 38 acceptFunction: function(cookieValue){if(cookieValue!='SSremovethisSS' && cookieValue!='yes') window.location = window.location.href;}, //Function to run after accept 39 declineButton: false, //Set to true to show decline/disable button 40 declineText: 'Disable Cookies', //Text on decline/disable button 41 declineFunction: function(cookieValue){if(cookieValue=='SSremovethisSS' || cookieValue=='yes') window.location = window.location.href;}, //Function to run after decline 42 policyButton: false, //Set to true to show Privacy Policy button 43 policyText: 'Privacy Policy', //Text on Privacy Policy button 44 policyURL: '/privacy-policy/', //URL of Privacy Policy 45 autoEnable: true, //Set to true for cookies to be yes automatically. Banner still shows 46 acceptOnContinue: false, //Set to true to accept cookies when visitor moves to another page 47 acceptOnScroll: false, //Set to true to accept cookies when visitor scrolls X pixels up or down 48 acceptAnyClick: false, //Set to true to accept cookies when visitor clicks anywhere on the page 49 expireDays: 365, //Number of days for cookieBar cookie to be stored for 50 renewOnVisit: false, //Renew the cookie upon revisit to website 51 forceShow: false, //Force cookieBar to show regardless of user cookie preference 52 effect: 'slide', //Options: slide, fade, hide 53 element: 'body', //Element to append/prepend cookieBar to. Remember "." for class or "#" for id. 54 append: false, //Set to true for cookieBar HTML to be placed at base of website. Actual position may change according to CSS 55 fixed: false, //Set to true to add the class "fixed" to the cookie bar. Default CSS should fix the position 56 bottom: false, //Force CSS when fixed, so bar appears at bottom of website 57 zindex: '', //Can be set in CSS, although some may prefer to set here 58 domain: String(window.location.hostname), //Location of privacy policy 59 referrer: String(document.referrer) //Where visitor has come from 60 }; 61 var options = $.extend(defaults,options); 62 63 //Sets expiration date for cookie 64 var expireDate = new Date(); 65 expireDate.setTime(expireDate.getTime()+(options.expireDays*86400000)); 66 expireDate = expireDate.toGMTString(); 67 68 var cookieEntry = 'viewed_cookie_policy={value}; expires='+expireDate+'; path=/'; 69 70 //Retrieves current cookie preference 71 var i,cookieValue='',aCookie,aCookies=document.cookie.split('; '); 72 for (i=0;i<aCookies.length;i++){ 73 aCookie = aCookies[i].split('='); 74 if(aCookie[0]=='viewed_cookie_policy'){ 75 cookieValue = aCookie[1]; 76 } 77 } 78 //Sets up default cookie preference if not already set 79 if(cookieValue=='' && doReturn!='cookies' && options.autoEnable){ 80 cookieValue = 'SSremovethisSS'; 81 //document.cookie = cookieEntry.replace('{value}','SSremovethisSS'); 82 }else if((cookieValue=='yes' || cookieValue=='declined') && doReturn!='cookies' && options.renewOnVisit){ 83 document.cookie = cookieEntry.replace('{value}',cookieValue); 84 } 85 if(options.acceptOnContinue){ 86 if(options.referrer.indexOf(options.domain)>=0 && String(window.location.href).indexOf(options.policyURL)==-1 && doReturn!='cookies' && doReturn!='set' && cookieValue!='yes' && cookieValue!='declined'){ 87 doReturn = 'set'; 88 val = 'yes'; 89 } 90 } 91 if(doReturn=='cookies'){ 92 //Returns true if cookies are SSremovethisSS, false otherwise 93 if(cookieValue=='SSremovethisSS' || cookieValue=='yes'){ 94 return true; 95 }else{ 96 return false;
97 } 98 }else if(doReturn=='set' && (val=='yes' || val=='declined')){ 99 //Sets value of cookie to 'yes' or 'declined' 100 document.cookie = cookieEntry.replace('{value}',val); 101 if(val=='yes'){ 102 return true; 103 }else{ 104 return false; 105 } 106 }else{ 107 //Sets up enable/accept button if required 108 var message = options.message.replace('{policy_url}',options.policyURL); 109 110 if(options.acceptButton){ 111 var acceptButton = '<a target="_black" href="" class="cb-enable">'+options.acceptText+'</a>'; 112 }else{ 113 var acceptButton = ''; 114 } 115 //Sets up disable/decline button if required 116 if(options.declineButton){ 117 var declineButton = '<a href="" class="cb-disable">'+options.declineText+'</a>'; 118 }else{ 119 var declineButton = ''; 120 } 121 //Sets up privacy policy button if required 122 if(options.policyButton){ 123 var policyButton = '<a href="'+options.policyURL+'" class="cb-policy">'+options.policyText+'</a>'; 124 }else{ 125 var policyButton = ''; 126 } 127 //Whether to add "fixed" class to cookie bar 128 if(options.fixed){ 129 if(options.bottom){ 130 var fixed = ' class="fixed bottom"'; 131 }else{ 132 var fixed = ' class="fixed"'; 133 } 134 }else{ 135 var fixed = ''; 136 } 137 if(options.zindex!=''){ 138 var zindex = ' style="z-index:'+options.zindex+';"'; 139 }else{ 140 var zindex = ''; 141 } 142 143 //Displays the cookie bar if arguments met 144 if(options.forceShow || cookieValue=='SSremovethisSS' || cookieValue==''){ 145 if(options.append){ 146 $(options.element).append('<div id="cookie-bar"'+fixed+zindex+'><p>'+message+acceptButton+declineButton+policyButton+'</p></div>'); 147 }else{ 148 $(options.element).prepend('<div id="cookie-bar"'+fixed+zindex+'><p>'+message+acceptButton+declineButton+policyButton+'</p></div>'); 149 } 150 } 151 152 var removeBar = function(func){ 153 if(options.acceptOnScroll) $(document).off('scroll'); 154 if(typeof(func)==='function') func(cookieValue); 155 if(options.effect=='slide'){ 156 $('#cookie-bar').slideUp(300,function(){$('#cookie-bar').remove();}); 157 }else if(options.effect=='fade'){ 158 $('#cookie-bar').fadeOut(300,function(){$('#cookie-bar').remove();}); 159 }else{ 160 $('#cookie-bar').hide(0,function(){$('#cookie-bar').remove();}); 161 } 162 $(document).unbind('click',anyClick); 163 }; 164 var cookieAccept = function(){ 165 document.cookie = cookieEntry.replace('{value}','yes'); 166 removeBar(options.acceptFunction); 167 }; 168 var cookieDecline = function(){ 169 var deleteDate = new Date(); 170 deleteDate.setTime(deleteDate.getTime()-(864000000)); 171 deleteDate = deleteDate.toGMTString(); 172 aCookies=document.cookie.split('; '); 173 for (i=0;i<aCookies.length;i++){ 174 aCookie = aCookies[i].split('='); 175 if(aCookie[0].indexOf('_')>=0){ 176 document.cookie = aCookie[0]+'=0; expires='+deleteDate+'; domain='+options.domain.replace('www','')+'; path=/'; 177 }else{ 178 document.cookie = aCookie[0]+'=0; expires='+deleteDate+'; path=/'; 179 } 180 } 181 document.cookie = cookieEntry.replace('{value}','declined'); 182 removeBar(options.declineFunction); 183 }; 184 var anyClick = function(e){ 185 if(!$(e.target).hasClass('cb-policy')) cookieAccept(); 186 }; 187 188 $('#cookie-bar .cb-enable').click(function(){cookieAccept();return false;}); 189 $('#cookie-bar .cb-disable').click(function(){cookieDecline();return false;}); 190 if(options.acceptOnScroll){ 191 var scrollStart = $(document).scrollTop(),scrollNew,scrollDiff; 192 $(document).on('scroll',function(){ 193 scrollNew = $(document).scrollTop(); 194 if(scrollNew>scrollStart){ 195 scrollDiff = scrollNew - scrollStart; 196 }else{ 197 scrollDiff = scrollStart - scrollNew; 198 } 199 if(scrollDiff>=Math.round(options.acceptOnScroll)) cookieAccept(); 200 }); 201 } 202 if(options.acceptAnyClick){ 203 $(document).bind('click',anyClick); 204 } 205 } 206 }; 207})(jQuery); 208 $.cookieBar({message: "Plantaardig.com gebruikt cookies bij uw bezoek aan de website. Bezoek je de website, dan ge je akkoord met het gebruik van deze cookies.", acceptText:"Akkoord!", policyButton: true, policyText: "Meer weten?", policyURL: "http://www.plantaardig.com/groenteninfo/disclaimer", fixed: true}); 209} 210 211if (typeof jQuery == 'undefined'){ 212 var head = document.getElementsByTagName('head')[0]; 213 var jqScript = document.createElement("script"); 214 215 jqScript.type = "text/javascript"; 216 jqScript.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; 217 jqScript.onreadystatechange = jsReadyCB; 218 jqScript.onload = jsReadyCB; 219 220 head.appendChild(jqScript); 221 222} 223 var cssId = 'cookiebarCss'; // you could encode the css path itself to generate id.. 224if (!document.getElementById(cssId)) 225{ 226 var head = document.getElementsByTagName('head')[0]; 227 var link = document.createElement('link'); 228 link.id = cssId; 229 link.rel = 'stylesheet'; 230 link.type = 'text/css'; 231 link.href = "http://www.plantaardig.com/scripts/jquery.cookiebar.css"; 232 link.media = 'all'; 233 head.appendChild(link); 234}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.