|
<!doctype html> <title>*Cookie law - CivicUK.com</title> |
|
|
|
<style> |
|
body { background:#fafafa; color:#333; font:1em sans-serif; } |
|
:focus, a:hover, button:hover, span:hover { outline:1px solid navy !important; } |
|
</style> |
|
|
|
<script src="http://www.geoplugin.net/javascript.gp"></script> |
|
<!--<script src="/PATH_TO_COOKIE_CONTROL/cookieControl-5.1.min.js"></script>--> |
|
<script src="http://www.civicuk.com/cookie-law/downloads/cookieControl-5.1.min.js"></script> |
|
<script> |
|
//<![CDATA[ |
|
cookieControl({ |
|
introText: '<p>This site uses some unobtrusive cookies to store information on your computer.</p>', |
|
fullText: '<p>Some cookies on this site are essential, and the site won\'t work as expected without them. These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking on simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of the site. If you\'re not happy with this, we won\'t set these cookies but some nice features of the site may be unavailable.</p><p>To control third party cookies, you can also adjust your <a href="browser-settings" target="_blank">browser settings</a>.</p><p>By using our site you accept the terms of our <a href="http://www.open.ac.uk/privacy">Privacy Policy</a>.</p>', |
|
position: 'left', // left or right |
|
shape: 'triangle', // triangle or diamond |
|
theme: 'light', // light or dark |
|
startOpen: true, |
|
autoHide: -1, //6000 ms |
|
subdomains: true, |
|
protectedCookies: [], //list the cookies you do not want deleted ['analytics', 'twitter'] |
|
consentModel: 'explicit', //'information_only' 'implicit' 'explicit' |
|
onAccept: function(){ ccAddAnalytics() }, |
|
onReady: function(){ ccAccessFixes() }, |
|
onCookiesAllowed: function(){ ccAddAnalytics() }, |
|
onCookiesNotAllowed: function(){}, |
|
countries: 'United Kingdom,Netherlands' // Or supply a list ['United Kingdom', 'Greece'] |
|
}); |
|
|
|
function ccAddAnalytics() { |
|
jQuery.getScript("http://www.google-analytics.com/ga.js", function() { |
|
var GATracker = _gat._createTracker('UA-123456-7'); |
|
GATracker._trackPageview(); |
|
}); |
|
} |
|
//]]> |
|
</script> |
|
|
|
|
|
<script> |
|
/** |
|
* Accessibility fixes: Civic's work seems pretty accessible. Here are some small fixes. |
|
*/ |
|
function ccAccessFixes() { |
|
var ttl = 'title', |
|
op = 'Opens in new window'; |
|
|
|
$('#cctoggle').attr({ |
|
role: 'button', |
|
tabindex: 0 |
|
}); |
|
|
|
$('#ccc-icon button').attr(ttl, 'Cookie control'); |
|
$('.ccc-close').attr(ttl, 'Close'); |
|
$('.ccc-about a').attr(ttl, op); |
|
|
|
$('.ccc-content [href = "browser-settings"]').attr({ |
|
href: 'http://civicuk.com/cookie-law/browser-settings', |
|
target: '_blank', |
|
title: op |
|
}); |
|
|
|
$('.ccc-content [href *= "privacy"]').attr({ |
|
href: 'http://www.open.ac.uk/privacy#cookies', |
|
target: '_blank', |
|
title: op |
|
}) |
|
}; |
|
|
|
|
|
('status request city region regionCode countryCode countryName continentCode latitude longitude currencyCode currencySymbol') |
|
.replace(/\w+/g, function(fn) { |
|
//var f = new Function('geoplugin_' + fn); |
|
var res = window['geoplugin_' + fn] (); |
|
console.log(fn + ': ' + res); |
|
}); |
|
//console.log( geoplugin_city()); |
|
//setTimeout(ccAccessFixes, 1200); |
|
</script> |
|
|
|
|
|
<h1>Cookie law test</h1> |
|
|
|
|
|
|
|
<pre> |
|
|
|
NDF, 14 Nov 2012 |
|
|
|
* http://civicuk.com/cookie-law/cookie_configuration_v5 |
|
* http://civicuk.com/assets/scripts/cookie-submit-v5.js |
|
|
|
* http://www.geoplugin.com/webservices/javascript |
|
* http://drupal.org/project/eu-cookie-compliance |
|
* http://wordpress.org/extend/plugins/cookie-law-info/ |