Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-10-05 00:44:04 +0300
committerGitHub <noreply@github.com>2020-10-05 00:44:04 +0300
commit9e10a150585522ca30ecdd275007a882a70c6df5 (patch)
tree0edd8766f71588cdb9c4ea49e9f43b9b1c27b346 /piwik.js
parent2aeeebe18b5bcd71073445ba97c6ce4b4f6252b5 (diff)
Always set consent removed cookie even when cookies are disabled (#16507)
Diffstat (limited to 'piwik.js')
-rw-r--r--piwik.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/piwik.js b/piwik.js
index 36bad11f33..f6c20323bd 100644
--- a/piwik.js
+++ b/piwik.js
@@ -30,7 +30,7 @@ ao=ae.findFirstNodeHavingAttribute(ap,this.CONTENT_PIECE_ATTR);if(!ao){ao=ae.fin
}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(ao){if(ae.hasNodeAttribute(ao,this.CONTENT_IGNOREINTERACTION_ATTR)){return true}if(ae.hasNodeCssClass(ao,this.CONTENT_IGNOREINTERACTION_CLASS)){return true}if(ae.hasNodeCssClass(ao,this.LEGACY_CONTENT_IGNOREINTERACTION_CLASS)){return true}return false}};function W(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(Q(ap,"matomo.php")){ap=f(ap,"matomo.php".length)
}else{if(Q(ap,"piwik.php")){ap=f(ap,"piwik.php".length)}else{if(Q(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(Q(ap,"/js/")){ap=f(ap,"js/".length)}return ap}function N(av){var ax="Matomo_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}S.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=S.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,av,aq){var au=S.name.split("###"),at=au[1],ao=au[2],ar=au[3],aw=W(ap,av);n(aw+"plugins/Overlay/client/client.js?v=1",function(){Matomo_Overlay_Client.initialize(aw,aq,at,ao,ar)})}function u(){var aq;try{aq=S.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return S.self!==S.top
}catch(ao){return true}}function P(cd,b9){var bJ=this,bd="mtm_consent",cC="mtm_cookie_consent",cL="mtm_consent_removed",b4=aa(G.domain,S.location.href,K()),cT=L(b4[0]),bN=o(b4[1]),bo=o(b4[2]),cR=false,ch="GET",c8=ch,aI="application/x-www-form-urlencoded; charset=UTF-8",cv=aI,aE=cd||"",bI="",cY="",b6=b9||"",bz="",bO="",a4,bj="",c5=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ay=[cT],bA=[],bL=[],a8=[],bK=500,cV=true,cI,a5,bR,bP,ao,co=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bH=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],bk="_pk_",av="pk_vid",aZ=180,cW,bq,bS=false,bm=false,cP,be,bw,cJ=33955200000,cm=1800000,c4=15768000000,a2=true,bF=false,bh=false,bQ=false,aQ=false,cb,bW={},cl={},bn={},bu=200,cr={},cZ={},c6={},ca=[],ce=false,cA=false,ap=false,c7=false,cM=false,aN=false,bc=u(),cw=null,cX=null,aR,bB,b7=am,bp,aL,cp=0,bv=["id","ses","cvar","ref"],cz=false,bC=null,cK=[],ax=T++,aw=false;
-try{bj=G.title}catch(cx){bj=""}function dc(dn,dl,dk,dm,dj,di){if(bm){return}var dh;if(dk){dh=new Date();dh.setTime(dh.getTime()+dk)}G.cookie=dn+"="+s(dl)+(dk?";expires="+dh.toGMTString():"")+";path="+(dm||"/")+(dj?";domain="+dj:"")+(di?";secure":"")+";SameSite=Lax"}function aD(dj){if(bm){return 0}var dh=new RegExp("(^|;)[ ]*"+dj+"=([^;]*)"),di=dh.exec(G.cookie);return di?R(di[2]):0}bC=!aD(cL);function b2(dh){var di;dh=j(dh,av);if(bP){di=new RegExp("#.*");return dh.replace(di,"")}return dh}function bV(dj,dh){var dk=r(dh),di;if(dk){return dh}if(dh.slice(0,1)==="/"){return r(dj)+"://"+d(dj)+dh}dj=b2(dj);di=dj.indexOf("?");if(di>=0){dj=dj.slice(0,di)}di=dj.lastIndexOf("/");if(di!==dj.length-1){dj=dj.slice(0,di+1)}return dj+dh}function cG(dj,dh){var di;dj=String(dj).toLowerCase();dh=String(dh).toLowerCase();if(dj===dh){return true}if(dh.slice(0,1)==="."){if(dj===dh.slice(1)){return true}di=dj.length-dh.length;if((di>0)&&(dj.slice(di)===dh)){return true}}return false}function ck(dh){var di=document.createElement("a");
+try{bj=G.title}catch(cx){bj=""}function dc(dn,dl,dk,dm,dj,di){if(bm&&dn!==cL){return}var dh;if(dk){dh=new Date();dh.setTime(dh.getTime()+dk)}G.cookie=dn+"="+s(dl)+(dk?";expires="+dh.toGMTString():"")+";path="+(dm||"/")+(dj?";domain="+dj:"")+(di?";secure":"")+";SameSite=Lax"}function aD(dj){if(bm){return 0}var dh=new RegExp("(^|;)[ ]*"+dj+"=([^;]*)"),di=dh.exec(G.cookie);return di?R(di[2]):0}bC=!aD(cL);function b2(dh){var di;dh=j(dh,av);if(bP){di=new RegExp("#.*");return dh.replace(di,"")}return dh}function bV(dj,dh){var dk=r(dh),di;if(dk){return dh}if(dh.slice(0,1)==="/"){return r(dj)+"://"+d(dj)+dh}dj=b2(dj);di=dj.indexOf("?");if(di>=0){dj=dj.slice(0,di)}di=dj.lastIndexOf("/");if(di!==dj.length-1){dj=dj.slice(0,di+1)}return dj+dh}function cG(dj,dh){var di;dj=String(dj).toLowerCase();dh=String(dh).toLowerCase();if(dj===dh){return true}if(dh.slice(0,1)==="."){if(dj===dh.slice(1)){return true}di=dj.length-dh.length;if((di>0)&&(dj.slice(di)===dh)){return true}}return false}function ck(dh){var di=document.createElement("a");
if(dh.indexOf("//")!==0&&dh.indexOf("http")!==0){if(dh.indexOf("*")===0){dh=dh.substr(1)}if(dh.indexOf(".")===0){dh=dh.substr(1)}dh="http://"+dh}di.href=v.toAbsoluteUrl(dh);if(di.pathname){return di.pathname}return""}function a3(di,dh){if(!aj(dh,"/")){dh="/"+dh}if(!aj(di,"/")){di="/"+di}var dj=(dh==="/"||dh==="/*");if(dj){return true}if(di===dh){return true}dh=String(dh).toLowerCase();di=String(di).toLowerCase();if(Q(dh,"*")){dh=dh.slice(0,-1);dj=(!dh||dh==="/");if(dj){return true}if(di===dh){return true}return di.indexOf(dh)===0}if(!Q(di,"/")){di+="/"}if(!Q(dh,"/")){dh+="/"}return di.indexOf(dh)===0}function ar(dl,dn){var di,dh,dj,dk,dm;for(di=0;di<ay.length;di++){dk=L(ay[di]);dm=ck(ay[di]);if(cG(dl,dk)&&a3(dn,dm)){return true}}return false}function aV(dk){var di,dh,dj;for(di=0;di<ay.length;di++){dh=L(ay[di].toLowerCase());if(dk===dh){return true}if(dh.slice(0,1)==="."){if(dk===dh.slice(1)){return true}dj=dk.length-dh.length;if((dj>0)&&(dk.slice(dj)===dh)){return true}}}return false}function cn(dh,dj){dh=dh.replace("send_image=0","send_image=1");
var di=new Image(1,1);di.onload=function(){E=0;if(typeof dj==="function"){dj({request:dh,trackerUrl:aE,success:true})}};di.onerror=function(){if(typeof dj==="function"){dj({request:dh,trackerUrl:aE,success:false})}};di.src=aE+(aE.indexOf("?")<0?"?":"&")+dh}function cD(dh){if(c8==="POST"){return true}return dh&&(dh.length>2000||dh.indexOf('{"requests"')===0)}function aK(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a6(dl,dp,dn){var dj=aK();if(!dj){return false}var dk={type:"application/x-www-form-urlencoded; charset=UTF-8"};var dq=false;var di=aE;try{var dh=new Blob([dl],dk);if(dn&&!cD(dl)){dh=new Blob([],dk);di=di+(di.indexOf("?")<0?"?":"&")+dl}dq=g.sendBeacon(di,dh)}catch(dm){return false}if(dq&&typeof dp==="function"){dp({request:dl,trackerUrl:aE,success:true,isSendBeacon:true})}return dq}function c3(di,dj,dh){if(!J(dh)||null===dh){dh=true}if(l&&a6(di,dj,dh)){return}setTimeout(function(){if(l&&a6(di,dj,dh)){return}var dm;try{var dl=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
dl.open("POST",aE,true);dl.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var dn=l&&a6(di,dj,dh);if(!dn&&dh){cn(di,dj)}else{if(typeof dj==="function"){dj({request:di,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dj==="function")){dj({request:di,trackerUrl:aE,success:true,xhr:this})}}};dl.setRequestHeader("Content-Type",cv);dl.withCredentials=true;dl.send(di)}catch(dk){dm=l&&a6(di,dj,dh);if(!dm&&dh){cn(di,dj)}else{if(typeof dj==="function"){dj({request:di,trackerUrl:aE,success:false})}}}},50)}function cf(di){var dh=new Date();var dj=dh.getTime()+di;if(!q||dj>q){q=dj}}function ba(){bc=true;cw=new Date().getTime()}function db(){var dh=new Date().getTime();return !cw||(dh-cw)>a5}function az(){if(db()){bR()}}function de(){if(aN||!a5){return}aN=true;an(S,"focus",ba);an(S,"blur",az);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aN&&db()){bR()}}})}function cB(dl){var di=new Date();var dh=di.getTime();cX=dh;if(cA&&dh<cA){var dj=cA-dh;