1/* 2 Cookie Consent Code 3 We are using the Cookie Consent API found here: https://cookieconsent.insites.com/ 4*/ 5 6function isEurope() { 7 var timezoneOffset = new Date().getTimezoneOffset(); 8 if (timezoneOffset >= -240 && timezoneOffset <= 0) { 9 return true; 10 } else { 11 return false; 12 } 13} 14 15function loadCSS(filename){ 16 var fileRef=document.createElement("link") 17 fileRef.setAttribute("rel", "stylesheet"); 18 fileRef.setAttribute("type", "text/css"); 19 fileRef.setAttribute("href", filename); 20 document.getElementsByTagName("head")[0].appendChild(fileRef); 21} 22 23if (isEurope()) { 24 // 3.0.3/cookieconsent.min.js 25 !function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){var i=/{{([a-z][a-z0-9\-_]*)}}/gi;return e.replace(i,function(e){return t(arguments[1])||""})},getCookie:function(e){var t="; "+document.cookie,i=t.split("; "+e+"=");return 2!=i.length?void 0:i.pop().split(";").shift()}
25,setCookie:function(e,t,i,n,o){var s=new Date;s.setDate(s.getDate()+(i||365));var r=[e+"="+t,"expires="+s.toUTCString(),"path="+(o||"/")];n&&r.push("domain="+n),document.cookie=r.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n,o=0;if(0===e.length)return o;for(t=0,n=e.length;t<n;++t)i=e.charCodeAt(t),o=(o<<5)-o+i,o|=0;return o},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){e=this.normaliseHex(e);var t=parseInt(e.substr(0,2),16),i=parseInt(e.substr(2,2),16),n=parseInt(e.substr(4,2),16),o=(299*t+587*i+114*n)/1e3;return o>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38,n=(t>>16)+i,o=(t>>8&255)+i,s=(255&t)+i,r=(16777216+65536*(n<255?n<1?0:n:255)+256*(o<255?o<1?0:o:255)+(s<255?s<1?0:s:255)).toString(16).slice(1);return"#"+r},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object}};
25e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&"undefined"!=typeof e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){function n(){this.initialise.apply(this,arguments)}function o(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function s(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function r(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var i=Object.keys(e.status),n=this.getStatus(),o=i.indexOf(n)>=0;return o&&t(n),o}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function c(){var e=this.options,i="top"==e.position||"bottom"==e.position?"banner":"floating";t.isMobile()&&(i="floating");var n=["cc-"+i,"cc-type-"+e.type,"cc-theme-"+e.theme];e["static"]&&n.push("cc-static"),n.push.apply(n,a.call(this));p.call(this,this.options.palette);return this.customStyleSelector&&n.push(this.customStyleSelector),n}function l(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message),Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var n=i.compliance[i.type];n||(n=i.compliance.info),e.compliance=t.interpolateString(n,function(t){return e[t]});var o=i.layouts[i.layout];return o||(o=i.layouts.basic),t.interpolateString(o,function(t){return e[t]})}function u(i){var n=this.options,o=document.createElement("div"),s=n.container&&1===n.container.nodeType?n.container:document.body;o.innerHTML=i;var r=o.children[0];return r.style.display="none",t.hasClass(r,"cc-window")&&e.hasTransition&&t.addClass(r,"cc-invisible"),this.onButtonClick=h.bind(this),r.addEventListener("click",this.onButtonClick),n.autoAttach&&(s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r)),r}function h(n){var o=n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0)),t.hasClass(o,"cc-revoke")&&this.revokeChoice()}function p(e){var i=t.hash(JSON.stringify(e)),n="cc-color-override-"+i,o=t.isPlainObject(e);return this.customStyleSelector=o?n:null,o&&d(i,e,"."+n),o}function d(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+v(a.background)]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var l=document.createElement("style");document.head.appendChild(l),e.customStyles[i]={references:1,element:l.sheet};var u=-1;for(var h in s)s.hasOwnProperty(h)&&l.sheet.insertRule(h+"{"+s[h].join(";")+"}",++u)}function v(e){return e=t.normaliseHex(e),"000000"==e?"#222":t.getLuminance(e)}function f(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}function m(e,t){for(var i=0,n=e.length;i<n;++i){var o=e[i];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}function b(){var t=this.setStatus.bind(this),i=this.options.dismissOnTimeout;"number"==typeof i&&i>
25=0&&(this.dismissTimeout=window.setTimeout(function(){t(e.status.dismiss)},Math.floor(i)));var n=this.options.dismissOnScroll;if("number"==typeof n&&n>=0){var o=function(i){window.pageYOffset>Math.floor(n)&&(t(e.status.dismiss),window.removeEventListener("scroll",o),this.onWindowScroll=null)};this.onWindowScroll=o,window.addEventListener("scroll",o)}}function y(){if("info"!=this.options.type&&(this.options.revokable=!0),t.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var i=this.options.revokeBtn.replace("{{classes}}",e.join(" "));this.revokeBtn=u.call(this,i);var n=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle(function(e){var i=!1,o=20,s=window.innerHeight-20;t.hasClass(n,"cc-top")&&e.clientY<o&&(i=!0),t.hasClass(n,"cc-bottom")&&e.clientY>s&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}var g={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},content:{header:"Cookies used on the website!",message:"This website uses cookies for analysis, attribution, and to personalize content so you get a better experience.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"http://cookie
25sandyou.com",close:"❌"},elements:{header:'<span class="cc-header">{{header}}</span> ',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0" class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}"><!--googleoff: all-->{{children}}<!--googleon: all--></div>',revokeBtn:'<div class="cc-revoke {{classes}}">Cookie Policy</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{dismiss}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block","static":!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};return n.prototype.initialise=function(e){this.options&&this.destroy(),t.deepExtend(this.options={},g),t.isPlainObject(e)&&t.deepExtend(this.options,e),r.call(this)&&(this.options.enabled=!1),m(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),m(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var i=this.options.window.replace("{{classes}}",c.call(this).join(" ")).replace("{{children}}",l.call(this)),n=this.options.overrideHTML;if("string"==typeof n&&n.length&&(i=n),this.options["static"]){var o=u.call(this,'<div class="cc-grower">'+i+"</div>");o.style.display="",this.element=o.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=u.call(this,i);b.call(this),y.call(this),this.options.autoOpen&&this.autoOpen()},n.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,f(this.options.palette),this.options=null},n.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},n.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},n.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&s.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options["static"]){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}var r=20;this.openingTimeout=setTimeout(o.bind(this,i),r)}},n.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),o.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options["static"]&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=s.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},n.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},n.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},n.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},n.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0}
25,n.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},n.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled&&this.open()},n.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},n.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},n.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},n}(),e.Location=function(){function e(e){t.deepExtend(this.options={},s),t.isPlainObject(e)&&t.deepExtend(this.options,e),this.currentServiceIndex=-1}function i(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function n(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r<a;++r){var c=o[r].split(":",2);s.setRequestHeader(c[0].replace(/^\s+|\s+$/g,""),c[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(s.onreadystatechange=function(){s.readyState>3&&t(s)}),s.send(n)}function o(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}var s={timeout:5e3,services:["freegeoip","ipinfo","maxmind"],serviceDefinitions:{freegeoip:function(){return{url:"//freegeoip.net/json/?callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return i.error?o(i):{code:i.country_code}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?o(i):{code:i.country}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?o({error:i.statusMessage}):{code:i.countryCode}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){return window.geoip2?void geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(i){e(o(i))}},function(t){e(o(t))}):void e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};return e.prototype.getNextService=function(){var e;do e=this.getServiceByIdx(++this.currentServiceIndex);while(this.currentServiceIndex<this.options.services.length&&!e);return e},e.prototype.getServiceByIdx=function(e){var i=this.options.services[e];if("function"==typeof i){var n=i();return n.name&&t.deepExtend(n,this.options.serviceDefinitions[n.name](n)),n}return"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},e.prototype.locate=function(e,t){var i=this.getNextService();return i?(this.callbackComplete=e,this.callbackError=t,void this.runService(i,this.runNextServiceOnError.bind(this))):void t(new Error("No services to run"))},e.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,function(i,n){if("callback"===n){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(n in t.interpolateUrl)return t.interpolateUrl[n]})},e.prototype.runService=function(e,t){var o=this;if(e&&e.url&&e.callback){var s=e.isScript?i:n,r=this.setupUrl(e);s(r,function(i){var n=i?i.responseText:"";e.__JSONP_DATA&&(n=e.__JSONP_DATA,delete e.__JSONP_DATA),o.runServiceCallback.call(o,t,e,n)},this.options.timeout,e.data,e.headers)}},e.prototype.runServiceCallback=function(e,t,i){var n=this,o=function(t){s||n.onServiceResult.call(n,e,t)},s=t.callback(o,i);s&&this.onServiceResult.call(this,e,s)},e.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},e.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},e.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}
25:"function"==typeof e?e():t.isPlainObject(e)?e:{}},e.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},e.prototype.logError=function(e){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.error("The service["+t+"] ("+i.url+") responded with the following error",e)},e}(),e.Law=function(){function e(e){this.initialise.apply(this,arguments)}var i={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","SI","ES","SE","GB","UK"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};return e.prototype.initialise=function(e){t.deepExtend(this.options={},i),t.isPlainObject(e)&&t.deepExtend(this.options,e)},e.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},e.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},e}(),e.initialise=function(t,i,n){var o=new e.Law(t.law);i||(i=function(){}),n||(n=function(){}),e.getCountryCode(t,function(n){delete t.law,delete t.location,n.code&&(t=o.applyLaw(t,n.code)),i(new e.Popup(t))},function(i){delete t.law,delete t.location,n(i,new e.Popup(t))})},e.getCountryCode=function(t,i,n){if(t.law&&t.law.countryCode)return void i({code:t.law.countryCode});if(t.location){var o=new e.Location(t.location);return void o.locate(function(e){i(e||{})},n)}i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{}); 26 27 loadCSS("/css/cookieconsent.css") ////dynamically load and add this .css file 28 29 window.addEventListener("load", function(){ 30 var p; 31 window.cookieconsent.initialise({ 32 "palette": { 33 "popup": { 34 "background": "#f7f7f7", 35 "text": "#777777" 36 }, 37 "button": { 38 "background": "#ffffff", 39 "text": "#444444", 40 "border": "#cccccc", 41 }, 42 }, 43 "type": "opt-out", 44 "content": { 45 "deny": "Opt Out", 46 "dismiss": "OK", 47 "link": "Learn More", 48 "href": "http://www.boomerangapp.com/cookiepolicy.html" 49 }, 50 onInitialise: function (status) { 51 if (status !== "deny") { 52 add_all_cookies(); 53 } else { 54 delete_all_cookies(); 55 } 56 }, 57 onPopupOpen: function (status) { 58 add_all_cookies(); 59 }, 60 onStatusChange: function(status, chosenBefore) { 61 console.log(status); 62 if (status !== "deny") { 63 add_all_cookies(); 64 } else { 65 delete_all_cookies(); 66 } 67 }, 68 }, function(popup) { 69 p = popup; 70 }) 71 var $xButton = $('<a>'); 72 $xButton.addClass('cc-close x-button'); 73 $xButton.attr('role', 'button'); 74 $('.cc-compliance').append($xButton); 75 $xButton.click(function (e) { 76 p.setStatus(cookieconsent.status.dismiss); 77 p.close(); 78 }) 79 }); 80} else { 81 add_all_cookies(); 82} 83 84function add_all_cookies() { 85 /* Google Analytics */ 86 87 /* GTag library for youtube analytics */ 88 var gtagscript = document.createElement('script'); gtagscript.type = 'text/javascript'; gtagscript.async = true; 89 gtagscript.src = "https://www.googletagmanager.com/gtag/js?id=G-WN7448DVSJ"; 90 var s3 = document.getElementsByTagName('script')[0]; s3.parentNode.insertBefore(gtagscript, s3); 91 92 window.dataLayer = window.dataLayer || []; 93 gtag = function(){dataLayer.push(arguments);} 94 gtag('js', new Date()); 95 96 gtag('config', 'G-WN7448DVSJ'); 97 gtag('config', 'UA-8959903-11'); 98 99 /* Bing UET Tag */ 100 (function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"136015023"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq"); 101 102 /* FB Pixel */
vendor: 497 bytes, lines 102-114
102 103 !function (f, b, e, v, n, t, s) { 104 if (f.fbq) return; n = f.fbq = function () { 105 n.callMethod ? 106 n.callMethod.apply(n, arguments) : n.queue.push(arguments) 107 }; 108 if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; 109 n.queue = []; t = b.createElement(e); t.async = !0; 110 t.src = v; s = b.getElementsByTagName(e)[0]; 111 s.parentNode.insertBefore(t, s) 112 }(window, document, 'script', 113 'https://connect.facebook.net/en_US/fbevents.js'); 114 fbq('init', '
114834377376621132
vendor: 38 bytes, lines 114-118
114'); 115 fbq('track', 'PageView'); 116 117 118
118/* LinkedIn */ 119 _linkedin_partner_id = "4648092"; 120 window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; 121 window._linkedin_data_partner_ids.push(_linkedin_partner_id); 122 123 (function(l) { 124 if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])}; 125 window.lintrk.q=[]} 126 var s = document.getElementsByTagName("script")[0]; 127 var b = document.createElement("script"); 128 b.type = "text/javascript";b.async = true; 129 b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; 130 s.parentNode.insertBefore(b, s);})(window.lintrk); 131 132} 133 134function delete_all_cookies() { 135 var _gaq = _gaq || []; 136 gtag = function(){}; 137 var cookies = document.cookie.split(";"); 138 for(var i=0; i < cookies.length; i++) { 139 var equals = cookies[i].indexOf("="); 140 var name = equals > -1 ? cookies[i].substr(0, equals) : cookies[i]; 141 if (!(name.indexOf("cookieconsent_status") > -1)) { 142 document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; 143 } 144 } 145} 146 147function gaq_to_gtags_helper(eventArray) { 148 //eventArray looks like ['_trackEvent', 'Download', 'Install', 'Chrome', 2] 149 var category = eventArray[1]; 150 var action = eventArray[2]; 151 var parameters = { 152 'event_category': category 153 } 154 if (eventArray[3]) { 155 parameters["event_label"] = eventArray[3]; 156 } 157 if (eventArray[4]) { 158 parameters["value"] = eventArray[4]; 159 } 160 gtag('event', action, parameters); 161} 162 163 164// Inline install code for B4G CTA buttons, copied from boomeranggmail.com's tags.js. 165// The one difference here is we are listening to clicks ONLY on "install-b4g" class, not "inline-install" (because boff CTA's need a different handler) 166var browserName; //moved outside function below to be more accessible 167 function inlineInstall($){ 168 /* Begin inline-install.js */ 169 // NOTE: This code is duplicated in index.html to get a faster page load ranking. 170 $(document).ready(function() { 171 //1. Browser Detection 172 //Browser detection code originally from quirksmode.org/js/detect.html (since removed) 173 //Edited since then to include new version of Opera 174 175 var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!==-1){return data[i].identity;}}else if(dataProp){return data[i].identity;}}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index===-1){return;}return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"OPR",identity:"Opera"},{string:navigator.userAgent,subString:"Edge",identity:"Edge"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]}; 176 177 BrowserDetect.init(); 178 switch(BrowserDetect.browser){ 179 case "Chrome": 180 browserName = "Chrome"; 181 break; 182 case "Firefox": 183 $("body").append($('<IMG SRC="chrome://boomerangforgmail/content/green-check.png" onload="detect_firefox_installed();" style="visibility:hidden">')); 184 browserName = "Firefox"; 185 break; 186 case "Safari": 187 if (BrowserDetect.version < 5.1) 188 { 189 browserName = "Old Safari"; 190 } 191 else 192 { 193 browserName = "Safari"; 194 } 195 break; 196 case "Opera": 197 browserName = "Opera"; 198 break; 199 case "Edge": 200 browserName = "Edge"; 201 break; 202 default: 203 browserName = "Other"; 204 break; 205 } 206 207 var FIREFOX_EXTENSION_INSTALLED = false;
208 function detect_firefox_installed() { 209 FIREFOX_EXTENSION_INSTALLED = true; 210 } 211 212 var ua = navigator.userAgent.toLowerCase(); 213 var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile"); 214 var isOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; //https://stackoverflow.com/a/9039885 215 if(isAndroid) { 216 $(".install-b4g").click(function(){ 217 gtag('event', 'Click', {'event_category': 'Play Store Redirect','event_label': 'Android',}); 218 window.setTimeout(function(){ 219 window.location.href = "https://play.google.com/store/apps/details?id=com.baydin.boomerang&referrer=utm_source%3Dboomeranggmailhomepage"; 220 },300); 221 $(this).attr("href", "https://play.google.com/store/apps/details?id=com.baydin.boomerang&referrer=utm_source%3Dboomeranggmailhomepage"); 222 }) 223 } 224 else if(isOS) { 225 $(".install-b4g").click(function(){ 226 gtag('event', 'Click', {'event_category': 'App Store Redirect','event_label': 'iOS',}); 227 window.setTimeout(function(){ 228 window.location.href = "itms-apps://itunes.apple.com/us/app/boomerang-mail-app/id1236906322"; 229 },300); 230 $(this).attr("href", "itms-apps://itunes.apple.com/us/app/boomerang-mail-app/id1236906322"); 231 }) 232 } 233 else{ 234 $(".install-b4g").click(downloadBoomerang); 235 } 236 function downloadBoomerang() { 237 browserName = BrowserDetect.browser 238 if (browserName == "Chrome") { 239 if (navigator.userAgent.indexOf("Edg") >= 0) { 240 gtag('event', 'Click', {'event_category': 'Download Attempt','event_label': 'New Edge',}); 241 window.location.href = "https://microsoftedge.microsoft.com/addons/detail/bdpaoopmnbhmhpnpplpdanjigencjjje"; 242 243 } else { 244 gtag('event', 'Click', {'event_category': 'Download Attempt','event_label': 'Chrome',}); 245 window.location.href = "https://chrome.google.com/webstore/detail/boomerang-for-gmail/mdanidgdpmkimeiiojknlnekblgmpdll"; 246 } 247 } 248 else if (browserName == "Firefox") { 249 if (!FIREFOX_EXTENSION_INSTALLED){ 250 gtag('event', 'Click', {'event_category': 'Download Attempt','event_label': 'Firefox',}); 251 gtag('event', 'Click', {'event_category': 'Install','event_label': 'Firefox',}); 252 window.location = "https://www.boomeranggmail.com/firefox/boomerangforgmail-signed-latest.xpi"; 253 document.location = "https://boomeranggmail.com/download.html?autoinstall=False"; 254 } 255 else{ 256 document.location = "https://mail.google.com"; 257 } 258 } 259 else if (browserName == "Safari") { 260 gtag('event', 'Click', {'event_category': 'Download Attempt','event_label': 'Safari',}); 261 document.location = "https://boomeranggmail.com/download.html"; 262 } 263 else if (browserName == "Opera") { 264 gtag('event', 'Click', {'event_category': 'Download Attempt','event_label': 'Opera',}); 265 window.location.href = "https://addons.opera.com/en/extensions/details/boomerang-for-gmailtm/"; 266 } 267 else if (browserName == "Edge") { 268 gtag('event', 'Click', {'event_category': 'Download Attempt','event_label': 'Edge',}); 269 document.location = "ms-windows-store://pdp/?ProductId=9n1xgls1vpq0"; 270 setTimeout(function() { "https://boomeranggmail.com/download.html"; }, 1000); 271 } 272 else { 273 document.location = "https://boomeranggmail.com/download.html"; 274 } 275 // Return false to prevent scrolling on page when CTA button is clicked 276 return false; 277 } 278 }); 279 } 280 /* End inline-install.js */ 281 282 /* Could limit below code to run only on pages with code that requires JS. */ 283 //Try to load jQuery locally if the CDN jQuery did not load, otherwise the inline-install will fail 284 if(!window.jQuery) { 285 var scriptElement = document.createElement("script"); 286 scriptElement.src = '//'+window.location.hostname+ '/js/jquery.js'; 287 scriptElement.type = "text/javascript"; 288 var head = document.getElementsByTagName("head")[0] || document.documentElement; 289 head.appendChild(scriptElement); 290 } 291 defer(); 292 //In case jQuery failed and we had to load it locally above, wait til jQuery is defined, then run inlineInstall c
292ode. 293 function defer() { 294 if (window.jQuery){ 295 inlineInstall(jQuery) 296 //if(window.location.pathname.indexOf("/l/") > -1) //check to see if current page is a landing page 297 // mobileBanner(jQuery) 298 } 299 else 300 setTimeout(function() { defer() }, 50); 301 } 302 303 /* Set copyright end date to present year, if it exists*/ 304 try{ // Some pages might not have a copyright footer and null.innerHTML will throw an exception 305 jQuery(document).ready(function() { 306 if(document.getElementById("dynamicCurrentYear")) 307 document.getElementById('dynamicCurrentYear').innerHTML = new Date().getFullYear(); 308 }); 309 } 310 catch(e){}
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.