1<!DOCTYPE html><html lang="en-gb" data-theme="mint-beige"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Current Archaeology - Current Publishing</title><meta name="description" content="Current Archaeology - Current Publishing, the UKs heritage publishing company."><meta name="generator" content="Publii Open-Source CMS for Static Site">
1<script type="gdpr-blocker/">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 2 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 3 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 4 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 5 })(window,document,'script','dataLayer','G-B99CJF3QM1');</script>
5<link rel="canonical" href="https://currentpublishing.com/ca.html"><meta property="og:title" content="Current Archaeology"><meta property="og:image" content="https://currentpublishing.com/media/posts/12/CA_Cover-fan.png"><meta property="og:image:width" content="700"><meta property="og:image:height" content="467"><meta property="og:site_name" content="Current Publishing"><meta property="og:description" content="Current Archaeology - Current Publishing, the UKs heritage publishing company."><meta property="og:url" content="https://currentpublishing.com/ca.html"><meta property="og:type" content="article"><link rel="shortcut icon" href="https://currentpublishing.com/media/website/favicon.ico" type="image/x-icon"><link rel="preload" href="https://currentpublishing.com/assets/dynamic/fonts/lora/lora.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="https://currentpublishing.com/assets/dynamic/fonts/archivonarrow/archivonarrow.woff2" as="font" type="font/woff2" crossorigin><link rel="stylesheet" href="https://currentpublishing.com/assets/css/style.css?v=eaa97e96863c2cf79e4f40cf1ff3c38f"><link rel="stylesheet" href="https://currentpublishing.com/assets/css/photoswipe.css?v=151447f0cf3c9ef292a571bc74c9472c">
5<script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://currentpublishing.com/ca.html"},"headline":"Current Archaeology","datePublished":"2022-09-28T11:14+01:00","dateModified":"2025-12-11T12:42+00:00","image":{"@type":"ImageObject","url":"https://currentpublishing.com/media/posts/12/CA_Cover-fan.png","height":467,"width":700},"description":"Current Archaeology - Current Publishing, the UKs heritage publishing company.","author":{"@type":"Person","name":"Current Publishing","url":"https://currentpublishing.com/authors/current-publishing/"},"publisher":{"@type":"Organization","name":"Current Publishing","logo":{"@type":"ImageObject","url":"https://currentpublishing.com/media/website/cplogo.gif","height":110,"width":298}}}</script>
5<style>.pswp--svg .pswp__button, 6 .pswp--svg .pswp__button--arrow--left:before, 7 .pswp--svg .pswp__button--arrow--right:before { 8 background-image: url(https://currentpublishing.com/assets/svg/gallery-icons-light.svg); 9 }</style>
9<script>
vendor: 398 bytes, lines 9-17
9!function(f,b,e,v,n,t,s) 10{if(f.fbq)return;n=f.fbq=function(){n.callMethod? 11n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 12if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 13n.queue=[];t=b.createElement(e);t.async=!0; 14t.src=v;s=b.getElementsByTagName(e)[0]; 15s.parentNode.insertBefore(t,s)}(window, document,'script', 16'https://connect.facebook.net/en_US/fbevents.js'); 17fbq('init', '
17566830136242437
vendor: 29 bytes, lines 17-18
17'); 18fbq('track', 'PageView');
18</script>
18<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=566830136242437&ev=PageView&noscript=1"></noscript></head><body><header class="header" id="js-header"><div><a class="logo" href="https://currentpublishing.com/"><img src="https://currentpublishing.com/media/website/cplogo.gif" alt="Current Publishing" width="298" height="110"></a><nav class="navbar js-navbar"><button class="navbar__toggle js-toggle" aria-label="Menu" aria-haspopup="true" aria-expanded="false"><span class="navbar__toggle-box"><span class="navbar__toggle-inner">Menu</span></span></button><ul class="navbar__menu"><li class="active-parent has-submenu"><a href="https://currentpublishing.com/brands.html" target="_self" aria-haspopup="true">What we do</a><ul class="navbar__submenu level-2" aria-hidden="true"><li class="active"><a href="https://currentpublishing.com/ca.html" target="_self">Current Archaeology</a></li><li><a href="https://currentpublishing.com/cwa.html" target="_self">World Archaeology</a></li><li><a href="https://currentpublishing.com/mhm.html" target="_self">Military History Matters</a></li><li><a href="https://currentpublishing.com/ae.html" target="_self">Ancient Egypt</a></li><li><a href="https://currentpublishing.com/calive.html" target="_self">Archaeology LIVE</a></li><li><a href="https://currentpublishing.com/the-past.html" target="_self">The Past</a></li></ul></li><li class="has-submenu"><a href="https://currentpublishing.com/about-us.html" target="_self" aria-haspopup="true">Who we are</a><ul class="navbar__submenu level-2" aria-hidden="true"><li><a href="https://currentpublishing.com/about-us.html" target="_self">About us</a></li><li><a href="https://currentpublishing.com/vacancies.html" target="_self">Vacancies</a></li></ul></li><li><a href="https://currentpublishing.com/shop" target="_self">Shop</a></li></ul></nav><a href="/subscribe.html" class="btn btn--dark header__reservation">SUBSCRIBE</a></div></header><main><article class="post"><header class="post__inner post__header--centered"><h1 class="h0 post__title">Current Archaeology</h1></header><div class="post__body"><div class="post__inner"><div class="post__entry"><p><em>Current Archaeology</em> is the UK's only independent consumer magazine aimed at the archaeology enthusiast. It is the best-selling title in its field and is popular with 45,000 readers passionate about heritage.</p><hr><aside class="post__aside"><h2 class="align-center">Subscribe</h2><ul><li><h6>Print Edition</h6><p><em>Current Archaeology</em> is published monthly and sent directly to your door.</p><p><a href="https://archaeology.co.uk/subscriptions" class="btn btn--white">Subscribe now » </a></p></li><li><h6>Digital Edition</h6><p>The digital archive is now available via Exact Editions</p><p><a href="https://shop.exacteditions.com/current-archaeology" class="btn btn--white">Subscribe now » </a></p></li><li><h6>Email Newsletter</h6><p>Sign up for our free archaeology newsletter</p><p><a href="https://www.archaeology.co.uk/newsletter" class="btn btn--white">Sign up » </a></p></li><li><h6>Follow us</h6><p><a href="https://www.archaeology.co.uk" aria-label="Web" class="twitter">www.archaeology.co.uk</a></p><a href="https://twitter.com/currentarchaeo" target="Twitter"><svg style="height: 1em; vertical-align: middle;"><use xlink:href="https://demo.getpublii.eu/themes/easyblog/mintbeige/assets/svg/svg-map.svg#twitter"></use></svg></a>   <a href="https://www.instagram.com/current_archaeology/" aria-label="Instagram" class="twitter"><svg style="height: 1em; vertical-align: middle;"><use xlink:href="https://demo.getpublii.eu/themes/easyblog/mintbeige/assets/svg/svg-map.svg#instagram"></use></svg></a>  <a href="https://www.facebook.com/currentarchaeologymag" aria-label="Facebook" class="facebook"><svg style="height: 1em; vertical-align: middle;"><use xlink:href="https://demo.getpublii.eu/themes/easyblog/mintbeige/assets/svg/svg-map.svg#facebook"></use></svg></a></li></ul></aside><p>The magazine covers the archaeology of all periods - from prehistory and ancient human origins, Roman and Anglo-Saxon Britain, and the Middle Ages right through to modern times - and bridges the gap between the amateur and the professional.</p><div class="gallery-wrapper"><div class="gallery" data-is-empty="false" data-translation="Add images" data-columns="3"><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/Cover1000px.jpg" data-size="1000x1345"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/Cover1000px-thumbn
18ail.jpg" alt="" width="768" height="1033"></a></figure><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/cover-1000.jpg" data-size="1000x1346"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/cover-1000-thumbnail.jpg" alt="" width="768" height="1034"></a></figure><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/Cover_1000.jpg" data-size="1000x1352"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/Cover_1000-thumbnail.jpg" alt="" width="768" height="1038"></a></figure></div></div><p>We aim neither to preach, nor to give a bare recital of facts. Instead we speak to the archaeologists themselves to bring you the full story: why the excavators went there, how they made their discoveries, what they found, why it's important, and, of course, what it all means. Published every month, each issue includes:</p><ul class="browser-default"><li>Digs - we bring you reports on the latest excavations, brilliantly described and beautifully illustrated with informative photographs and stunning aerial images</li><li>Discoveries - every magazine discusses new discoveries and puts them into context</li><li>Debate - lively opinion pieces keep you informed on all the debates currently taking place within archaeology and why they matter</li></ul><p><em>Current Archaeology</em> is distributed throughout the UK in WHSmith, selected independent newsagents, and via subscription. Our website <a href="http://www.archaeology.co.uk/" target="CA">www.archaeology.co.uk</a> is a wonderful online resource for anyone with an interest in archaeology, featuring news, reviews, and select content from the magazine. It's also the home of the comprehensive and ever-popular Digs Guide, where every year we list the excavations you can take part in across the UK and Ireland.</p><hr><h2>The Current Archaeology team</h2><div class="gallery-wrapper"><div class="gallery" data-is-empty="false" data-translation="Add images" data-columns="4"><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/carly.jpg" data-size="350x350"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/carly-thumbnail.jpg" alt="Carly Hilts, Editor" width="350" height="350"></a><figcaption>Carly Hilts, Editor</figcaption></figure><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/kathryn.jpg" data-size="350x350"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/kathryn-thumbnail.jpg" alt="Kathryn Krakowka, Deputy Editor" width="350" height="350"></a><figcaption>Kathryn Krakowka, Deputy Editor</figcaption></figure><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/mark.jpg" data-size="350x350"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/mark-thumbnail.jpg" alt="Mark Edwards, Art Editor" width="350" height="350"></a><figcaption>Mark Edwards, Art Editor</figcaption></figure></div></div><p>Editorial Staff</p><p><strong>Carly Hilts</strong> studied Anglo-Saxon, Norse and Celtic at St John's College, Cambridge, before becoming a journalist. Quickly realising she preferred covering history and archaeology stories above all others, she joined <em>Time Team</em> as a researcher, later working for <em>Horrible Histories </em>and helping to create an ancient Egyptian-themed computer game, and assisting with research for the recently-published <em>The Bones of a King: Richard III Rediscovered</em>.</p><p><strong>Kathryn Krakowka</strong> received her DPhil in Archaeology from the University of Oxford in 2017, where she specialised in human osteology. For her doctoral thesis she focused on identifying the prevalence and patterns of violence-related trauma in medieval London and has continued to publish on the topic. She has also worked as a research associate at the Oxford University Museum of Natural History, working to record and analyse their extensive human remains collections, most of which originated from the medical and anatomical museum at Christ Church College, Oxford. Museum research and curation continues to remain a passion for her.</p><p><strong>Amy Brunskill</strong> studied Archaeology and Anthropology at Durham University before deciding that archaeology w
18as her preferred subject. She then went on to read for an MA Archaeology at Durham, focusing on art in Palaeolithic Europe. She is also interested in the presentation of archaeology and heritage to the public, having worked in a number of museums including the British Museum, Museum of London, and the Foundling Museum, and led a heritage project studying the economic impact of Durham Castle on the surrounding area for the UNESCO World Heritage Site management plan.</p><div class="gallery-wrapper"><div class="gallery" data-is-empty="false" data-translation="Add images" data-columns="4"><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/andrew.jpg" data-size="350x350"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/andrew-thumbnail.jpg" alt="Andrew Selkirk" width="350" height="350"></a><figcaption>Andrew Selkirk</figcaption></figure><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/chris.jpg" data-size="350x350"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/chris-thumbnail.jpg" alt="Chris Catling" width="350" height="350"></a><figcaption>Chris Catling</figcaption></figure><figure class="gallery__item"><a href="https://currentpublishing.com/media/posts/12/gallery/joe.jpg" data-size="350x350"><img loading="lazy" src="https://currentpublishing.com/media/posts/12/gallery/joe-thumbnail.jpg" alt="Joe Flatman" width="350" height="350"></a><figcaption>Joe Flatman</figcaption></figure></div></div><h3>Regular contributors</h3><p><strong>Andrew Selkirk</strong> is a Fellow of the Society of Antiquaries, and was Vice-President of the Royal Archaeological Institute, and has served on the councils of the Prehistoric Society, and the Roman Society. He has a particular interest in amateur archaeology, and is Chairman of the Council for Independent Archaeology. </p><p><strong>Chris Catling</strong> has been digging since he was 16, and is currently co-Director with Tim Darvill of an excavation near Cirencester looking at a linked Neolithic long barrow and causewayed enclosure. He is a Fellow of the Society of Antiquaries and the best-selling author of travel guides to Venice, Florence, Amsterdam, Madeira, London and Crete, and countless popular articles on British archaeology.</p><p><strong>Joe Flatman</strong> completed a PhD in medieval archaeology at the University of Southampton in 2003, and since that time has held a variety of positions in universities, local and most recently central government. Since 2012 he has been Head of Listing Programmes at Historic England. He has published widely on matters of heritage policy, law and management, including the books Prehistoric Archaeology of the Continental Shelf (2014), Archaeology in Society: Its Relevance in the Modern World (2012) and Becoming an Archaeologist: A Guide to Professional Pathways (2011). You can follow him on Twitter @joeflatman.</p></div></div></div></article></main><footer class="footer section"><div class="footer__inner"><a class="logo footer__logo" href="https://currentpublishing.com/"><img src="https://currentpublishing.com/media/website/cplogo.gif" alt="Current Publishing" width="298" height="110"></a><div class="footer__copyright"><ul class="footer-col"><li><p><strong>CURRENT PUBLISHING</strong></p><p>Current Publishing is an independently owned magazine publishing company based in London that focuses on the heritage sector.</p><p>Founded in 1967, we now deliver hundreds of thousands of copies per year to dedicated, intelligent readers from the UK, the US, and the rest of the world.</p></li><li><p><strong>UK OFFICE</strong></p><p>Current Publishing Ltd<br>Office 120<br>295 Chiswick High Road<br>London<br>W4 4HH</p><p>+44 (0) 20 8819 5580<br><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3a53545c557a594f48485f544e4a4f585653495253545d14595557">[email protected]</a></p></li><li><p><strong>US OFFICE</strong></p><p>Current Publishing Inc.<br>2 Enterprise Drive Suite<br>420 Shelton<br>Connecticut<br>06484<br>USA</p></li></ul><p>© 2025 Current Publishing. All rights reserved.</p></div><div class="footer__nav"><ul class="footer__nav"><li><a href="https://currentpublishing.com/terms-conditions.html" target="_self">Terms & Conditions</a></li><li><a href="https://currentpublishing.com/purchasing.html" target="_self">Purchasing & Returns</a></li><li><a href="https://currentpublishing.com/privacy.html" target="_self">Privacy Policy</a></li><li><a href="https://currentpublishing.com/vacancies.html" target="_self">Vacancies</a></li><li><a href="https://currentpublishing.com/advertising.html" target="_self">Advertising</a></li><li><a href="https://currentpublishing.com/subscribe.html" target="_self">Subscribe</a></li></ul></div></div></footer>
vendor: 108 bytes, line 18
18<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>
18<script defer="defer" src="https://currentpublishing.com/assets/js/scripts.min.js?v=6ee59465c67403142e643120f27f91df"></script>
18<script>window.publiiThemeMenuConfig = { 19 mobileMenuMode: 'overlay', 20 animationSpeed: 300, 21 submenuWidth: 'auto', 22 doubleClickTime: 500, 23 mobileMenuExpandableSubmenus: false, 24 relatedContainerForOverlayMenuSelector: '.navbar', 25 };</script>
25<script>var images = document.querySelectorAll('img[loading]'); 26 27 for (var i = 0; i < images.length; i++) { 28 if (images[i].complete) { 29 images[i].classList.add('is-loaded'); 30 } else { 31 images[i].addEventListener('load', function () { 32 this.classList.add('is-loaded'); 33 }, false); 34 } 35 }</script>
35<script defer="defer" src="https://currentpublishing.com/assets/js/photoswipe.min.js?v=017385b552f7e0d979e2e2fe6f324015"></script>
35<script defer="defer" src="https://currentpublishing.com/assets/js/photoswipe-ui-default.min.js?v=d067f0883540b1ddda0e2c9ad1b14260"></script>
35<script>var initPhotoSwipeFromDOM=function(gallerySelector){var parseThumbnailElements=function(el){var thumbElements=el.childNodes,numNodes=thumbElements.length,items=[],figureEl,linkEl,size,item;for(var i=0;i<numNodes;i++){figureEl=thumbElements[i];if(figureEl.nodeType!==1){continue;} 36 linkEl=figureEl.children[0];size=linkEl.getAttribute('data-size').split('x');item={src:linkEl.getAttribute('href'),w:parseInt(size[0],10),h:parseInt(size[1],10)};if(figureEl.children.length>1){item.title=figureEl.children[1].innerHTML;} 37 if(linkEl.children.length>0){item.msrc=linkEl.children[0].getAttribute('src');} 38 item.el=figureEl;items.push(item);} 39 return items;};var closest=function closest(el,fn){return el&&(fn(el)?el:closest(el.parentNode,fn));};var onThumbnailsClick=function(e){e=e||window.event;e.preventDefault?e.preventDefault():e.returnValue=false;var eTarget=e.target||e.srcElement;var clickedListItem=closest(eTarget,function(el){return(el.tagName&&el.tagName.toUpperCase()==='FIGURE');});if(!clickedListItem){return;} 40 var clickedGallery=clickedListItem.parentNode,childNodes=clickedListItem.parentNode.childNodes,numChildNodes=childNodes.length,nodeIndex=0,index;for(var i=0;i<numChildNodes;i++){if(childNodes[i].nodeType!==1){continue;} 41 if(childNodes[i]===clickedListItem){index=nodeIndex;break;} 42 nodeIndex++;} 43 if(index>=0){openPhotoSwipe(index,clickedGallery);} 44 return false;};var photoswipeParseHash=function(){var hash=window.location.hash.substring(1),params={};if(hash.length<5){return params;} 45 var vars=hash.split('&');for(var i=0;i<vars.length;i++){if(!vars[i]){continue;} 46 var pair=vars[i].split('=');if(pair.length<2){continue;} 47 params[pair[0]]=pair[1];} 48 if(params.gid){params.gid=parseInt(params.gid,10);} 49 return params;};var openPhotoSwipe=function(index,galleryElement,disableAnimation,fromURL){var pswpElement=document.querySelectorAll('.pswp')[0],gallery,options,items;items=parseThumbnailElements(galleryElement);options={galleryUID:galleryElement.getAttribute('data-pswp-uid'),getThumbBoundsFn:function(index){var thumbnail=items[index].el.getElementsByTagName('img')[0],pageYScroll=window.pageYOffset||document.documentElement.scrollTop,rect=thumbnail.getBoundingClientRect();return{x:rect.left,y:rect.top+pageYScroll,w:rect.width};}, 50 mainClass:'pswp--dark', 51 preload: [1,2], 52 hideAnimationDuration:200, 53 showAnimationDuration:0, 54 bgOpacity: 0.9, 55 showHideOpacity:true, 56 closeOnScroll: true, 57 arrowKeys: true, 58 closeEl: true, 59 captionEl: true, 60 fullscreenEl: true, 61 zoomEl: true, 62 shareEl: true, 63 counterEl: true, 64 arrowEl: true, 65 preloaderEl: true 66 };if(fromURL){if(options.galleryPIDs){for(var j=0;j<items.length;j++){if(items[j].pid==index){options.index=j;break;}}}else{options.index=parseInt(index,10)-1;}}else{options.index=parseInt(index,10);} 67 if(isNaN(options.index)){return;} 68 if(disableAnimation){options.showAnimationDuration=0;} 69 gallery=new PhotoSwipe(pswpElement,PhotoSwipeUI_Default,items,options);gallery.init();gallery.options.escKey=true;};var galleryElements=document.querySelectorAll(gallerySelector);for(var i=0,l=galleryElements.length;i<l;i++){galleryElements[i].setAttribute('data-pswp-uid',i+1);galleryElements[i].onclick=onThumbnailsClick;} 70 var hashData=photoswipeParseHash();if(hashData.pid&&hashData.gid){openPhotoSwipe(hashData.pid,galleryElements[hashData.gid-1],true,true);}};window.addEventListener('load', function () {initPhotoSwipeFromDOM('.gallery');}, false);</script>
70<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button><button class="pswp__button pswp__button--share" title="Share"></button><button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button><button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button><button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div><div class="pcb" data-behaviour="link" data-behaviour-link="#cookie-sett
70ings" data-revision="1" data-config-ttl="365" data-debug-mode="false"><div role="dialog" aria-modal="true" aria-hidden="true" aria-labelledby="pcb-title" aria-describedby="pcb-txt" class="pcb__banner"><div class="pcb__inner"><div id="pcb-title" role="heading" aria-level="2" class="pcb__title">This website uses cookies</div><div id="pcb-txt" class="pcb__txt">Select which cookies to opt-in to via the checkboxes below; our website uses cookies to examine site traffic and user activity while on our site, for marketing, and to provide social media functionality.</div><div class="pcb__buttons"><button type="button" class="pcb__btn pcb__btn--solid pcb__btn--accept">Accept all</button></div></div></div></div>
70<script>(function(win) { 71 if (!document.querySelector('.pcb')) { 72 return; 73 } 74 75 var cbConfig = { 76 behaviour: document.querySelector('.pcb').getAttribute('data-behaviour'), 77 behaviourLink: document.querySelector('.pcb').getAttribute('data-behaviour-link'), 78 revision: document.querySelector('.pcb').getAttribute('data-revision'), 79 configTTL: parseInt(document.querySelector('.pcb').getAttribute('data-config-ttl'), 10), 80 debugMode: document.querySelector('.pcb').getAttribute('data-debug-mode') === 'true', 81 initialState: null, 82 initialLsState: null, 83 previouslyAccepted: [] 84 }; 85 86 var cbUI = { 87 wrapper: document.querySelector('.pcb'), 88 banner: { 89 element: null, 90 btnAccept: null, 91 btnReject: null, 92 btnConfigure: null 93 }, 94 popup: { 95 element: null, 96 btnClose: null, 97 btnSave: null, 98 btnAccept: null, 99 btnReject: null, 100 checkboxes: null, 101 }, 102 overlay: null, 103 badge: null, 104 blockedScripts: document.querySelectorAll('script[type^="gdpr-blocker/"]'), 105 triggerLinks: cbConfig.behaviourLink ? document.querySelectorAll('a[href*="' + cbConfig.behaviourLink + '"]') : null 106 }; 107 108 function initUI () { 109 // setup banner elements 110 cbUI.banner.element = cbUI.wrapper.querySelector('.pcb__banner'); 111 cbUI.banner.btnAccept = cbUI.banner.element.querySelector('.pcb__btn--accept'); 112 cbUI.banner.btnReject = cbUI.banner.element.querySelector('.pcb__btn--reject'); 113 cbUI.banner.btnConfigure = cbUI.banner.element.querySelector('.pcb__btn--configure'); 114 115 // setup popup elements 116 if (cbUI.wrapper.querySelector('.pcb__popup')) { 117 cbUI.popup.element = cbUI.wrapper.querySelector('.pcb__popup'); 118 cbUI.popup.btnClose = cbUI.wrapper.querySelector('.pcb__popup__close'); 119 cbUI.popup.btnSave = cbUI.popup.element.querySelector('.pcb__btn--save'); 120 cbUI.popup.btnAccept = cbUI.popup.element.querySelector('.pcb__btn--accept'); 121 cbUI.popup.btnReject = cbUI.popup.element.querySelector('.pcb__btn--reject'); 122 cbUI.popup.checkboxes = cbUI.popup.element.querySelector('input[type="checkbox"]'); 123 // setup overlay 124 cbUI.overlay = cbUI.wrapper.querySelector('.pcb__overlay'); 125 } 126 127 cbUI.badge = cbUI.wrapper.querySelector('.pcb__badge'); 128 129 if (cbConfig.behaviour.indexOf('link') > -1) { 130 for (var i = 0; i < cbUI.triggerLinks.length; i++) { 131 cbUI.triggerLinks[i].addEventListener('click', function(e) { 132 e.preventDefault(); 133 showBannerOrPopup(); 134 }); 135 } 136 } 137 } 138 139 function initState () { 140 var lsKeyName = getConfigName(); 141 var currentConfig = localStorage.getItem(lsKeyName); 142 var configIsFresh = checkIfConfigIsFresh(); 143 144 if (!configIsFresh || currentConfig === null) { 145 if (cbConfig.debugMode) { 146 console.log('ðª Config not found, or configuration expired'); 147 } 148 149 if (window.publiiCBGCM) { 150 gtag('consent', 'default', { 151 'ad_storage': window.publiiCBGCM.defaultState.ad_storage ? 'granted' : 'denied', 152 'ad_personalization': window.publiiCBGCM.defaultState.ad_personalization ? 'granted' : 'denied', 153 'ad_user_data': window.publiiCBGCM.defaultState.ad_user_data ? 'granted' : 'denied', 154 'analytics_storage': window.publiiCBGCM.defaultState.analytics_storage ? 'granted' : 'denied', 155 'personalization_storage': window.publiiCBGCM.defaultState.personalization_storage ? 'granted' : 'denied', 156 'functionality_storage': window.publiiCBGCM.defaultState.functionality_storage ? 'granted' : 'denied', 157 'security_storage': window.publiiCBGCM.defaultState.security_storage ? 'granted' : 'denied' 158 }); 159 160 if (cbConfig.debugMode) { 161 console.log('ðª GCMv2 DEFAULT STATE: ' + JSON.stringify({ 162 'ad_storage': window.publiiCBGCM.defaultState.ad_storage ? 'granted' : 'denied', 163 'ad_personalization': window.publiiCBGCM.defaultState.ad_personalization ? 'granted' : 'denied', 164 'ad_user_data': window.publiiCBGCM.defaultState.ad_user_data ? 'granted' : 'denied',
165 'analytics_storage': window.publiiCBGCM.defaultState.analytics_storage ? 'granted' : 'denied', 166 'personalization_storage': window.publiiCBGCM.defaultState.personalization_storage ? 'granted' : 'denied', 167 'functionality_storage': window.publiiCBGCM.defaultState.functionality_storage ? 'granted' : 'denied', 168 'security_storage': window.publiiCBGCM.defaultState.security_storage ? 'granted' : 'denied' 169 })); 170 } 171 } 172 173 showBanner(); 174 } else if (typeof currentConfig === 'string') { 175 if (cbConfig.debugMode) { 176 console.log('ðª Config founded'); 177 } 178 179 cbConfig.initialLsState = currentConfig.split(','); 180 181 if (window.publiiCBGCM) { 182 gtag('consent', 'default', { 183 'ad_storage': getDefaultConsentState(currentConfig, 'ad_storage'), 184 'ad_personalization': getDefaultConsentState(currentConfig, 'ad_personalization'), 185 'ad_user_data': getDefaultConsentState(currentConfig, 'ad_user_data'), 186 'analytics_storage': getDefaultConsentState(currentConfig, 'analytics_storage'), 187 'personalization_storage': getDefaultConsentState(currentConfig, 'personalization_storage'), 188 'functionality_storage': getDefaultConsentState(currentConfig, 'functionality_storage'), 189 'security_storage': getDefaultConsentState(currentConfig, 'security_storage') 190 }); 191 192 if (cbConfig.debugMode) { 193 console.log('ðª GCMv2 DEFAULT STATE: ' + JSON.stringify({ 194 'ad_storage': getDefaultConsentState(currentConfig, 'ad_storage'), 195 'ad_personalization': getDefaultConsentState(currentConfig, 'ad_personalization'), 196 'ad_user_data': getDefaultConsentState(currentConfig, 'ad_user_data'), 197 'analytics_storage': getDefaultConsentState(currentConfig, 'analytics_storage'), 198 'personalization_storage': getDefaultConsentState(currentConfig, 'personalization_storage'), 199 'functionality_storage': getDefaultConsentState(currentConfig, 'functionality_storage'), 200 'security_storage': getDefaultConsentState(currentConfig, 'security_storage') 201 })); 202 } 203 } 204 205 showBadge(); 206 207 if (cbUI.popup.element) { 208 var allowedGroups = currentConfig.split(','); 209 var checkedCheckboxes = cbUI.popup.element.querySelectorAll('input[type="checkbox"]:checked'); 210 211 for (var j = 0; j < checkedCheckboxes.length; j++) { 212 var name = checkedCheckboxes[j].getAttribute('data-group-name'); 213 214 if (name && name !== '-' && allowedGroups.indexOf(name) === -1) { 215 checkedCheckboxes[j].checked = false; 216 } 217 } 218 219 for (var i = 0; i < allowedGroups.length; i++) { 220 var checkbox = cbUI.popup.element.querySelector('input[type="checkbox"][data-group-name="' + allowedGroups[i] + '"]'); 221 222 if (checkbox) { 223 checkbox.checked = true; 224 } 225 226 allowCookieGroup(allowedGroups[i]); 227 } 228 } 229 } 230 231 setTimeout(function () { 232 cbConfig.initialState = getInitialStateOfConsents(); 233 }, 0); 234 } 235 236 function checkIfConfigIsFresh () { 237 var lastConfigSave = localStorage.getItem('publii-gdpr-cookies-config-save-date'); 238 239 if (lastConfigSave === null) { 240 return false; 241 } 242 243 lastConfigSave = parseInt(lastConfigSave, 10); 244 245 if (lastConfigSave === 0) { 246 return true; 247 } 248 249 if (+new Date() - lastConfigSave < cbConfig.configTTL * 24 * 60 * 60 * 1000) { 250 return true; 251 } 252 253 return false;
254 } 255 256 function getDefaultConsentState (currentConfig, consentGroup) { 257 let configGroups = currentConfig.split(','); 258 259 for (let i = 0; i < configGroups.length; i++) { 260 let groupName = configGroups[i]; 261 let group = window.publiiCBGCM.groups.find(group => group.cookieGroup === groupName); 262 263 if (group && group[consentGroup]) { 264 return 'granted'; 265 } 266 } 267 268 if (window.publiiCBGCM.defaultState[consentGroup]) { 269 return 'granted'; 270 } 271 272 return 'denied'; 273 } 274 275 function initBannerEvents () { 276 cbUI.banner.btnAccept.addEventListener('click', function (e) { 277 e.preventDefault(); 278 acceptAllCookies('banner'); 279 showBadge(); 280 }, false); 281 282 if (cbUI.banner.btnReject) { 283 cbUI.banner.btnReject.addEventListener('click', function (e) { 284 e.preventDefault(); 285 rejectAllCookies(); 286 showBadge(); 287 }, false); 288 } 289 290 if (cbUI.banner.btnConfigure) { 291 cbUI.banner.btnConfigure.addEventListener('click', function (e) { 292 e.preventDefault(); 293 hideBanner(); 294 showAdvancedPopup(); 295 showBadge(); 296 }, false); 297 } 298 } 299 300 function initPopupEvents () { 301 if (!cbUI.popup.element) { 302 return; 303 } 304 305 cbUI.overlay.addEventListener('click', function (e) { 306 hideAdvancedPopup(); 307 }, false); 308 309 cbUI.popup.element.addEventListener('click', function (e) { 310 e.stopPropagation(); 311 }, false); 312 313 cbUI.popup.btnAccept.addEventListener('click', function (e) { 314 e.preventDefault(); 315 acceptAllCookies('popup'); 316 }, false); 317 318 cbUI.popup.btnReject.addEventListener('click', function (e) { 319 e.preventDefault(); 320 rejectAllCookies(); 321 }, false); 322 323 cbUI.popup.btnSave.addEventListener('click', function (e) { 324 e.preventDefault(); 325 saveConfiguration(); 326 }, false); 327 328 cbUI.popup.btnClose.addEventListener('click', function (e) { 329 e.preventDefault(); 330 hideAdvancedPopup(); 331 }, false); 332 } 333 334 function initBadgeEvents () { 335 if (!cbUI.badge) { 336 return; 337 } 338 339 cbUI.badge.addEventListener('click', function (e) { 340 showBannerOrPopup(); 341 }, false); 342 } 343 344 initUI(); 345 initState(); 346 initBannerEvents(); 347 initPopupEvents(); 348 initBadgeEvents(); 349 350 /** 351 * API 352 */ 353 function addScript (src, inline) { 354 var newScript = document.createElement('script'); 355 356 if (src) { 357 newScript.setAttribute('src', src); 358 } 359 360 if (inline) { 361 newScript.text = inline; 362 } 363 364 document.body.appendChild(newScript); 365 } 366 367 function allowCookieGroup (allowedGroup) { 368 var scripts = document.querySelectorAll('script[type="gdpr-blocker/' + allowedGroup + '"]'); 369 cbConfig.previouslyAccepted.push(allowedGroup); 370 371 for (var j = 0; j < scripts.length; j++) { 372 addScript(scripts[j].src, scripts[j].text); 373 } 374 375 var groupEvent = new Event('publii-cookie-banner-unblock-' + allowedGroup); 376 document.body.dispatchEvent(groupEvent); 377 unlockEmbeds(allowedGroup); 378 379 if (cbConfig.debugMode) { 380 console.log('ðª Allowed group: ' + allowedGroup); 381 } 382 383 if (window.publiiCBGCM && (!cbConfig.initialLsState || cbConfig.initialLsState.indexOf(allowedGroup) === -1)) { 384 let consentResult = {}; 385 let group = window.publiiCBGCM.groups.find(group => group.cookieGroup === allowedGroup); 386 387 if (group) { 388 let foundSomeConsents = false; 389 390 Object.keys(group).forEach(key => { 391 if (key !== 'cookieGroup' && group[key] === true) { 392 consentResult[key] = 'granted'; 393 foundSomeConsents = true; 394 } 395 }); 396 397 if (foundSomeConsents) { 398 gtag('consent', 'update', consentResult); 399 400 if (cbConfig.debugMode) { 401 console.log('ðª GCMv2 UPDATE: ' + JSON.stringify(consentResult)); 402 } 403 } 404 } 405 } 406 } 407 408 function showBannerOrPopup () { 409 if (cbUI.popup.element) { 410 showAdvancedPopup(); 411 } else { 412 showBanner(); 413 } 414 } 415 416 function showAdvancedPopup () { 417 cbUI.popup.element.classList.add('is-visible'); 418 cbUI.overlay.classList.add('is-visible'); 419 cbUI.popup.element.setAttribute('aria-hidden', 'false'); 420 cbUI.overlay.setAttribute('aria-hidden', 'false'); 421 } 422 423 function hideAdvancedPopup () { 424 cbUI.popup.element.classList.remove('is-visible'); 425 cbUI.overlay.classList.remove('is-visible'); 426 cbUI.popup.element.setAttribute('aria-hidden', 'true'); 427 cbUI.overlay.setAttribute('aria-hidden', 'true'); 428 } 429 430 function showBanner () { 431 cbUI.banner.element.classList.add('is-visible'); 432 cbUI.banner.element.setAttribute('aria-hidden', 'false'); 433 } 434 435 function hideBanner () { 436 cbUI.banner.element.classList.remove('is-visible'); 437 cbUI.banner.element.setAttribute('aria-hidden', 'true'); 438 } 439 440 function showBadge () { 441 if (!cbUI.badge) { 442 return; 443 } 444 445 cbUI.badge.classList.add('is-visible'); 446 cbUI.badge.setAttribute('aria-hidden', 'false'); 447 } 448 449 function getConfigName () { 450 var lsKeyName = 'publii-gdpr-allowed-cookies'; 451 452 if (cbConfig.revision) { 453 lsKeyName = lsKeyName + '-v' + parseInt(cbConfig.revision, 10); 454 } 455 456 return lsKeyName; 457 } 458 459 function storeConfiguration (allowedGroups) { 460 var lsKeyName = getConfigName(); 461 var dataToStore = allowedGroups.join(','); 462 localStorage.setItem(lsKeyName, dataToStore); 463 464 if (cbConfig.configTTL === 0) { 465 localStorage.setItem('publii-gdpr-cookies-config-save-date', 0); 466 467 if (cbConfig.debugMode) { 468 console.log('ðª Store never expiring configuration'); 469 } 470 } else { 471 localStorage.setItem('publii-gdpr-cookies-config-save-date', +new Date()); 472 } 473 } 474 475 function getInitialStateOfConsents () { 476 if (!cbUI.popup.element) { 477 return []; 478 } 479 480 var checkedGroups = cbUI.popup.element.querySelectorAll('input[type="checkbox"]:checked'); 481 var groups = []; 482 483 for (var i = 0; i < checkedGroups.length; i++) { 484 var allowedGroup = checkedGroups[i].getAttribute('data-group-name'); 485 486 if (allowedGroup !== '') { 487 groups.push(allowedGroup); 488 } 489 } 490 491 if (cbConfig.debugMode) { 492 console.log('ðª Initial state: ' + groups.join(', ')); 493 } 494 495 return groups; 496 } 497 498 function getCurrentStateOfConsents () { 499 if (!cbUI.popup.element) { 500 return []; 501 } 502 503 var checkedGroups = cbUI.popup.element.querySelectorAll('input[type="checkbox"]:checked'); 504 var groups = []; 505 506 for (var i = 0; i < checkedGroups.length; i++) { 507 var allowedGroup = checkedGroups[i].getAttribute('data-group-name'); 508 509 if (allowedGroup !== '') { 510 groups.push(allowedGroup); 511 } 512 } 513 514 if (cbConfig.debugMode) { 515 console.log('ðª State to save: ' + groups.join(', ')); 516 } 517 518 return groups; 519 } 520 521 function getAllGroups () { 522 if (!cbUI.popup.element) { 523 return []; 524 } 525 526 var checkedGroups = cbUI.popup.element.querySelectorAll('input[type="checkbox"]'); 527 var groups = []; 528 529 for (var i = 0; i < checkedGroups.length; i++) { 530 var allowedGroup = checkedGroups[i].getAttribute('data-group-name'); 531 532 if (allowedGroup !== '') { 533 groups.push(allowedGroup); 534 } 535 } 536 537 return groups; 538 } 539 540 function acceptAllCookies (source) { 541 var groupsToAccept = getAllGroups(); 542 storeConfiguration(groupsToAccept); 543 544 for (var i = 0; i < groupsToAccept.length; i++) { 545 var group = groupsToAccept[i]; 546 547 if (cbConfig.initialState.indexOf(group) > -1 || cbConfig.previouslyAccepted.indexOf(group) > -1) { 548 if (cbConfig.debugMode) { 549 console.log('ðª Skip previously activated group: ' + group); 550 } 551 552 continue; 553 } 554 555 allowCookieGroup(group); 556 } 557 558 if (cbUI.popup.element) { 559 var checkboxesToCheck = cbUI.popup.element.querySelectorAll('input[type="checkbox"]'); 560 561 for (var j = 0; j < checkboxesToCheck.length; j++) { 562 checkboxesToCheck[j].checked = true; 563 } 564 } 565 566 if (cbConfig.debugMode) { 567 console.log('ðª Accept all cookies: ', groupsToAccept.join(', ')); 568 } 569 570 if (source === 'popup') { 571 hideAdvancedPopup(); 572 } else if (source === 'banner') { 573 hideBanner(); 574 } 575 } 576 577 function rejectAllCookies () { 578 if (cbConfig.debugMode) {
579 console.log('ðª Reject all cookies'); 580 } 581 582 storeConfiguration([]); 583 setTimeout(function () { 584 window.location.reload(); 585 }, 100); 586 } 587 588 function saveConfiguration () { 589 var groupsToAccept = getCurrentStateOfConsents(); 590 storeConfiguration(groupsToAccept); 591 592 if (cbConfig.debugMode) { 593 console.log('ðª Save new config: ', groupsToAccept.join(', ')); 594 } 595 596 if (reloadIsNeeded(groupsToAccept)) { 597 setTimeout(function () { 598 window.location.reload(); 599 }, 100); 600 return; 601 } 602 603 for (var i = 0; i < groupsToAccept.length; i++) { 604 var group = groupsToAccept[i]; 605 606 if (cbConfig.initialState.indexOf(group) > -1 || cbConfig.previouslyAccepted.indexOf(group) > -1) { 607 if (cbConfig.debugMode) { 608 console.log('ðª Skip previously activated group: ' + group); 609 } 610 611 continue; 612 } 613 614 allowCookieGroup(group); 615 } 616 617 hideAdvancedPopup(); 618 } 619 620 function reloadIsNeeded (groupsToAccept) { 621 // check if user rejected consent for initial groups 622 var initialGroups = cbConfig.initialState; 623 var previouslyAcceptedGroups = cbConfig.previouslyAccepted; 624 var groupsToCheck = initialGroups.concat(previouslyAcceptedGroups); 625 626 for (var i = 0; i < groupsToCheck.length; i++) { 627 var groupToCheck = groupsToCheck[i]; 628 629 if (groupToCheck !== '' && groupsToAccept.indexOf(groupToCheck) === -1) { 630 if (cbConfig.debugMode) { 631 console.log('ðª Reload is needed due lack of: ', groupToCheck); 632 } 633 634 return true; 635 } 636 } 637 638 return false; 639 } 640 641 function unlockEmbeds (cookieGroup) { 642 var iframesToUnlock = document.querySelectorAll('.pec-wrapper[data-consent-group-id="' + cookieGroup + '"]'); 643 644 for (var i = 0; i < iframesToUnlock.length; i++) { 645 var iframeWrapper = iframesToUnlock[i]; 646 iframeWrapper.querySelector('.pec-overlay').classList.remove('is-active'); 647 iframeWrapper.querySelector('.pec-overlay').setAttribute('aria-hidden', 'true'); 648 var iframe = iframeWrapper.querySelector('iframe'); 649 iframe.setAttribute('src', iframe.getAttribute('data-consent-src')); 650 } 651 } 652 653 win.publiiEmbedConsentGiven = function (cookieGroup) { 654 // it will unlock embeds 655 allowCookieGroup(cookieGroup); 656 657 var checkbox = cbUI.popup.element.querySelector('input[type="checkbox"][data-group-name="' + cookieGroup + '"]'); 658 659 if (checkbox) { 660 checkbox.checked = true; 661 } 662 663 var groupsToAccept = getCurrentStateOfConsents(); 664 storeConfiguration(groupsToAccept); 665 666 if (cbConfig.debugMode) { 667 console.log('ðª Save new config: ', groupsToAccept.join(', ')); 668 } 669 } 670})(window);</script>
670</body></html>
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.