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>2019-08-01 23:55:14 +0300
committerGitHub <noreply@github.com>2019-08-01 23:55:14 +0300
commit9e750867fc2820ccd3b028b9ec0bad90509c7740 (patch)
tree9fefbace366fa809cb87c1807b975b02f1458582 /matomo.js
parent5f452adec15d6c103b3bc810fb17f8378de79452 (diff)
fix disableHeartBeatTimer doesnt really removes event listeners (#14668)
Diffstat (limited to 'matomo.js')
-rw-r--r--matomo.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/matomo.js b/matomo.js
index ec9cbfcc05..f7ca9c2068 100644
--- a/matomo.js
+++ b/matomo.js
@@ -65,8 +65,8 @@ if(db>0){if(!J(dc)){dc=""}if(!w(dc)){dc=String(dc)}bh[db]=dc}};this.getCustomDim
}else{if(db==="event"){ch={}}else{if(db==="visit"||db===2){aM={}}}}};this.storeCustomVariablesInCookie=function(){bL=true};this.setLinkTrackingTimer=function(db){bE=db};this.getLinkTrackingTimer=function(){return bE};this.setDownloadExtensions=function(db){if(w(db)){db=db.split("|")}c0=db};this.addDownloadExtensions=function(dc){var db;if(w(dc)){dc=dc.split("|")}for(db=0;db<dc.length;db++){c0.push(dc[db])}};this.removeDownloadExtensions=function(dd){var dc,db=[];if(w(dd)){dd=dd.split("|")}for(dc=0;dc<c0.length;dc++){if(M(dd,c0[dc])===-1){db.push(c0[dc])}}c0=db};this.setDomains=function(db){au=w(db)?[db]:db;var df=false,dd=0,dc;for(dd;dd<au.length;dd++){dc=String(au[dd]);if(cB(cO,L(dc))){df=true;break}var de=cg(dc);if(de&&de!=="/"&&de!=="/*"){df=true;break}}if(!df){au.push(cO)}};this.enableCrossDomainLinking=function(){cH=true};this.disableCrossDomainLinking=function(){cH=false};this.isCrossDomainLinkingEnabled=function(){return cH};this.setCrossDomainLinkingTimeout=function(db){aV=db};this.getCrossDomainLinkingUrlParameter=function(){return t(ar)+"="+t(bm())
};this.setIgnoreClasses=function(db){bu=w(db)?[db]:db};this.setRequestMethod=function(db){c3=db||cd};this.setRequestContentType=function(db){cs=db||aE};this.setReferrerUrl=function(db){bi=db};this.setCustomUrl=function(db){a0=bQ(bI,db)};this.getCurrentUrl=function(){return a0||bI};this.setDocumentTitle=function(db){be=db};this.setAPIUrl=function(db){bC=db};this.setDownloadClasses=function(db){bG=w(db)?[db]:db};this.setLinkClasses=function(db){a4=w(db)?[db]:db};this.setCampaignNameKey=function(db){cm=w(db)?[db]:db};this.setCampaignKeywordKey=function(db){bB=w(db)?[db]:db};this.discardHashTag=function(db){bK=db};this.setCookieNamePrefix=function(db){bf=db;aM=bS()};this.setCookieDomain=function(db){var dc=L(db);if(br(dc)){cR=dc;bd()}};this.getCookieDomain=function(){return cR};this.hasCookies=function(){return"1"===b0()};this.setSessionCookie=function(dd,dc,db){if(!dd){throw new Error("Missing cookie name")}if(!J(db)){db=ck}bp.push(dd);c6(aP(dd),dc,db,bk,cR)};this.getCookie=function(dc){var db=az(aP(dc));
if(db===0){return null}return db};this.setCookiePath=function(db){bk=db;bd()};this.getCookiePath=function(db){return bk};this.setVisitorCookieTimeout=function(db){cD=db*1000};this.setSessionCookieTimeout=function(db){ck=db*1000};this.getSessionCookieTimeout=function(){return ck};this.setReferralCookieTimeout=function(db){cZ=db*1000};this.setConversionAttributionFirstReferrer=function(db){bq=db};this.setSecureCookie=function(db){bN=db};this.disableCookies=function(){bg=true;c1.cookie="0";if(b1){aB()}};this.deleteCookies=function(){aB()};this.setDoNotTrack=function(dc){var db=h.doNotTrack||h.msDoNotTrack;cK=dc&&(db==="yes"||db==="1");if(cK){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cQ=true};this.addListener=function(dc,db){an(dc,db)};this.enableLinkTracking=function(dc){c2=true;var db=this;cc(function(){q(function(){by(dc,db)})})};this.enableJSErrorTracking=function(){if(cM){return}cM=true;var db=T.onerror;T.onerror=function(dg,de,dd,df,dc){cc(function(){var dh="JavaScript Errors";
-var di=de+":"+dd;if(df){di+=":"+df}ap(dh,di,dg)});if(db){return db(dg,de,dd,df,dc)}return false}};this.disablePerformanceTracking=function(){aY=false};this.setGenerationTimeMs=function(db){ci=parseInt(db,10)};this.enableHeartBeatTimer=function(db){db=Math.max(db,1);a1=(db||15)*1000;if(cS!==null){c8()}};this.disableHeartBeatTimer=function(){bF();if(a1||aK){if(T.removeEventListener){T.removeEventListener("focus",a6,true);T.removeEventListener("blur",av,true)}else{if(T.detachEvent){T.detachEvent("onfocus",a6);T.detachEvent("onblur",av)}}}a1=null;aK=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(db){if(T.location.protocol==="file:"){T.location=db}};this.setCountPreRendered=function(db){ba=db};this.trackGoal=function(db,de,dd,dc){cc(function(){cN(db,de,dd,dc)})};this.trackLink=function(dc,db,de,dd){cc(function(){cV(dc,db,de,dd)})};this.getNumTrackedPageViews=function(){return cn};this.trackPageView=function(db,dd,dc){b5=[];
-cE=[];if(N(b1)){cc(function(){Y(aA,bC,b1)})}else{cc(function(){cn++;bV(db,dd,dc)})}};this.trackAllContentImpressions=function(){if(N(b1)){return}cc(function(){q(function(){var db=v.findContentNodes();var dc=cu(db);c7(dc,bE)})})};this.trackVisibleContentImpressions=function(db,dc){if(N(b1)){return}if(!J(db)){db=true}if(!J(dc)){dc=750}aO(db,dc,this);cc(function(){n(function(){var dd=v.findContentNodes();var de=a5(dd);c7(de,bE)})})};this.trackContentImpression=function(dd,db,dc){if(N(b1)){return}dd=a(dd);db=a(db);dc=a(dc);if(!dd){return}db=db||"Unknown";cc(function(){var de=aC(dd,db,dc);bA(de,bE)})};this.trackContentImpressionsWithinNode=function(db){if(N(b1)||!db){return}cc(function(){if(ca){n(function(){var dc=v.findContentNodesWithinNode(db);var dd=a5(dc);c7(dd,bE)})}else{q(function(){var dc=v.findContentNodesWithinNode(db);var dd=cu(dc);c7(dd,bE)})}})};this.trackContentInteraction=function(dd,de,db,dc){if(N(b1)){return}dd=a(dd);de=a(de);db=a(db);dc=a(dc);if(!dd||!de){return}db=db||"Unknown";
+var di=de+":"+dd;if(df){di+=":"+df}ap(dh,di,dg)});if(db){return db(dg,de,dd,df,dc)}return false}};this.disablePerformanceTracking=function(){aY=false};this.setGenerationTimeMs=function(db){ci=parseInt(db,10)};this.enableHeartBeatTimer=function(db){db=Math.max(db,1);a1=(db||15)*1000;if(cS!==null){c8()}};this.disableHeartBeatTimer=function(){bF();if(a1||aK){if(T.removeEventListener){T.removeEventListener("focus",a6);T.removeEventListener("blur",av)}else{if(T.detachEvent){T.detachEvent("onfocus",a6);T.detachEvent("onblur",av)}}}a1=null;aK=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(db){if(T.location.protocol==="file:"){T.location=db}};this.setCountPreRendered=function(db){ba=db};this.trackGoal=function(db,de,dd,dc){cc(function(){cN(db,de,dd,dc)})};this.trackLink=function(dc,db,de,dd){cc(function(){cV(dc,db,de,dd)})};this.getNumTrackedPageViews=function(){return cn};this.trackPageView=function(db,dd,dc){b5=[];cE=[];
+if(N(b1)){cc(function(){Y(aA,bC,b1)})}else{cc(function(){cn++;bV(db,dd,dc)})}};this.trackAllContentImpressions=function(){if(N(b1)){return}cc(function(){q(function(){var db=v.findContentNodes();var dc=cu(db);c7(dc,bE)})})};this.trackVisibleContentImpressions=function(db,dc){if(N(b1)){return}if(!J(db)){db=true}if(!J(dc)){dc=750}aO(db,dc,this);cc(function(){n(function(){var dd=v.findContentNodes();var de=a5(dd);c7(de,bE)})})};this.trackContentImpression=function(dd,db,dc){if(N(b1)){return}dd=a(dd);db=a(db);dc=a(dc);if(!dd){return}db=db||"Unknown";cc(function(){var de=aC(dd,db,dc);bA(de,bE)})};this.trackContentImpressionsWithinNode=function(db){if(N(b1)||!db){return}cc(function(){if(ca){n(function(){var dc=v.findContentNodesWithinNode(db);var dd=a5(dc);c7(dd,bE)})}else{q(function(){var dc=v.findContentNodesWithinNode(db);var dd=cu(dc);c7(dd,bE)})}})};this.trackContentInteraction=function(dd,de,db,dc){if(N(b1)){return}dd=a(dd);de=a(de);db=a(db);dc=a(dc);if(!dd||!de){return}db=db||"Unknown";
cc(function(){var df=aL(dd,de,db,dc);if(df){bA(df,bE)}})};this.trackContentInteractionNode=function(dc,db){if(N(b1)||!dc){return}cc(function(){var dd=c4(dc,db);if(dd){bA(dd,bE)}})};this.logAllContentBlocksOnPage=function(){var dd=v.findContentNodes();var db=v.collectContent(dd);var dc=typeof console;if(dc!=="undefined"&&console&&console.log){console.log(db)}};this.trackEvent=function(dc,de,db,dd,dg,df){cc(function(){ap(dc,de,db,dd,dg,df)})};this.trackSiteSearch=function(db,dd,dc,de){b5=[];cc(function(){b3(db,dd,dc,de)})};this.setEcommerceView=function(de,db,dd,dc){if(!J(dd)||!dd.length){dd=""}else{if(dd instanceof Array){dd=JSON_PIWIK.stringify(dd)}}bR[5]=["_pkc",dd];if(J(dc)&&String(dc).length){bR[2]=["_pkp",dc]}if((!J(de)||!de.length)&&(!J(db)||!db.length)){return}if(J(de)&&de.length){bR[3]=["_pks",de]}if(!J(db)||!db.length){db=""}bR[4]=["_pkn",db]};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(cU))};this.addEcommerceItem=function(df,db,dd,dc,de){if(df.length){cU[df]=[df,db,dd,dc,de]
}};this.removeEcommerceItem=function(db){if(db.length){delete cU[db]}};this.clearEcommerceCart=function(){cU={}};this.trackEcommerceOrder=function(db,df,de,dd,dc,dg){bU(db,df,de,dd,dc,dg)};this.trackEcommerceCartUpdate=function(db){bn(db)};this.trackRequest=function(dc,de,dd,db){cc(function(){var df=co(dc,de,db);bA(df,bE,dd)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bx.enabled=false};this.queueRequest=function(db){cc(function(){var dc=co(db);bx.push(dc)})};this.getRememberedConsent=function(){var db=az(a9);if(az(cG)){if(db){bT(a9,bk,cR)}return null}if(!db||db===0){return null}return db};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cv=true;bw=this.hasRememberedConsent();x++;b["CoreConsent"+x]={unload:function(){if(!bw){aB()}}}};this.setConsentGiven=function(){bw=true;bT(cG,bk,cR);var dc,db;for(dc=0;dc<cE.length;dc++){db=typeof cE[dc];if(db==="string"){bA(cE[dc],bE)
}else{if(db==="object"){c7(cE[dc],bE)}}}cE=[]};this.rememberConsentGiven=function(dc){if(bg){ah("rememberConsentGiven is called but cookies are disabled, consent will not be remembered");return}if(dc){dc=dc*60*60*1000}this.setConsentGiven();var db=new Date().getTime();c6(a9,db,dc,bk,cR,bN)};this.forgetConsentGiven=function(){if(bg){ah("forgetConsentGiven is called but cookies are disabled, consent will not be forgotten");return}var db=30*365*24*60*60*1000;bT(a9,bk,cR);c6(cG,new Date().getTime(),db,bk,cR,bN);this.requireConsent()};this.isUserOptedOut=function(){return !bw};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=this.rememberConsentGiven;e.trigger("TrackerSetup",[this])}function H(){return{push:ad}}function c(aq,ap){var ar={};var an,ao;for(an=0;an<ap.length;an++){var al=ap[an];ar[al]=1;for(ao=0;ao<aq.length;ao++){if(aq[ao]&&aq[ao][0]){var am=aq[ao][0];if(al===am){ad(aq[ao]);delete aq[ao];if(ar[am]>1&&am!=="addTracker"){ah("The method "+am+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')