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:
authorrobocoder <anthon.pang@gmail.com>2012-10-28 05:48:44 +0400
committerrobocoder <anthon.pang@gmail.com>2012-10-28 05:48:44 +0400
commit0e91f277bfb7640cfddb75b37f4e7d3002038016 (patch)
tree5e70a141b7be2b759289d519da1116de713348ca /piwik.js
parent637b7db96f5d27118a7e72b1948c7c4832c51002 (diff)
fixes #3416 - scale resolution by window.devicePixelRatio on Safari iOS/Mac OS X
git-svn-id: http://dev.piwik.org/svn/trunk@7319 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'piwik.js')
-rw-r--r--piwik.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/piwik.js b/piwik.js
index c81d226df7..fdd41d6557 100644
--- a/piwik.js
+++ b/piwik.js
@@ -22,9 +22,9 @@ if(be.length){break}}}}bJ=c(aK);br=bC.length?c(bC):"";if(bJ.length&&!aH(bJ)&&(!a
}}}aS(bK,JSON2.stringify(Q),ad,ba,X,aa)}W(bE,bw,bk,bo,bn,q(bi)&&String(bi).length?bi:by);aS(bp,"*",ad,ba,X,aa);bg+=E(bG);return bg}function aV(bh,bg,bl,bi,be,bo){var bj="idgoal=0",bk,bf=new Date(),bm=[],bn;if(String(bh).length){bj+="&ec_id="+h(bh);bk=Math.round(bf.getTime()/1000)}bj+="&revenue="+bg;if(String(bl).length){bj+="&ec_st="+bl}if(String(bi).length){bj+="&ec_tx="+bi}if(String(be).length){bj+="&ec_sh="+be}if(String(bo).length){bj+="&ec_dt="+bo}if(aQ){for(bn in aQ){if(Object.prototype.hasOwnProperty.call(aQ,bn)){if(!q(aQ[bn][1])){aQ[bn][1]=""}if(!q(aQ[bn][2])){aQ[bn][2]=""}if(!q(aQ[bn][3])||String(aQ[bn][3]).length===0){aQ[bn][3]=0}if(!q(aQ[bn][4])||String(aQ[bn][4]).length===0){aQ[bn][4]=1}bm.push(aQ[bn])}}bj+="&ec_items="+h(JSON2.stringify(bm))}bj=am(bj,U,"ecommerce",bk);aq(bj,aF)}function aU(be,bi,bh,bg,bf,bj){if(String(be).length&&q(bi)){aV(be,bi,bh,bg,bf,bj)}}function a8(be){if(q(be)){aV("",be,"","","","")}}function ay(bh,bi){var be=new Date(),bg=am("action_name="+h(K(bh||al)),bi,"log");
aq(bg,aF);if(S&&ag&&!aL){aL=true;J(o,"click",a0);J(o,"mouseup",a0);J(o,"mousedown",a0);J(o,"mousemove",a0);J(o,"mousewheel",a0);J(w,"DOMMouseScroll",a0);J(w,"scroll",a0);J(o,"keypress",a0);J(o,"keydown",a0);J(o,"keyup",a0);J(w,"resize",a0);J(w,"focus",a0);J(w,"blur",a0);aJ=be.getTime();setTimeout(function bf(){var bj=new Date(),bk;if((aJ+ag)>bj.getTime()){if(S<bj.getTime()){bk=am("ping=1",bi,"ping");aq(bk,aF)}setTimeout(bf,ag)}},ag)}}function aj(be,bh,bf,bi){var bg=am("search="+h(be)+(bh?"&search_cat="+h(bh):"")+(q(bf)?"&search_count="+bf:""),bi,"sitesearch");aq(bg,aF)}function aD(be,bh,bg){var bf=am("idgoal="+be+(bh?"&revenue="+bh:""),bg,"goal");aq(bf,aF)}function aZ(bf,be,bh){var bg=am(be+"="+h(a6(bf)),bh,"link");aq(bg,aF)}function a3(bf,be){if(bf!==""){return bf+be.charAt(0).toUpperCase()+be.slice(1)}return be}function ai(bj){var bi,be,bh=["","webkit","ms","moz"],bg;if(!ar){for(be=0;be<bh.length;be++){bg=bh[be];if(Object.prototype.hasOwnProperty.call(o,a3(bg,"hidden"))){if(o[a3(bg,"visibilityState")]==="prerender"){bi=true
}break}}}if(bi){J(o,bg+"visibilitychange",function bf(){o.removeEventListener(bg+"visibilitychange",bf,false);bj()});return}bj()}function ah(bg,bf){var bh,be="(^| )(piwik[_-]"+bf;if(bg){for(bh=0;bh<bg.length;bh++){be+="|"+bg[bh]}}be+=")( |$)";return new RegExp(be)}function aY(bh,be,bi){var bg=ah(az,"download"),bf=ah(ae,"link"),bj=new RegExp("\\.("+an+")([?&#]|$)","i");return bf.test(bh)?"link":(bg.test(bh)||bj.test(be)?"download":(bi?0:"link"))}function aP(bj){var bh,bf,be;while((bh=bj.parentNode)!==null&&q(bh)&&((bf=bj.tagName.toUpperCase())!=="A"&&bf!=="AREA")){bj=bh}if(q(bj.href)){var bk=bj.hostname||c(bj.href),bl=bk.toLowerCase(),bg=bj.href.replace(bk,bl),bi=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto):","i");if(!bi.test(bg)){be=aY(bj.className,bg,aH(bl));if(be){bg=e(bg);aZ(bg,be)}}}}function bc(be){var bf,bg;be=be||w.event;bf=be.which||be.button;bg=be.target||be.srcElement;if(be.type==="click"){if(bg){aP(bg)}}else{if(be.type==="mousedown"){if((bf===1||bf===2)&&bg){aB=bf;
-Y=bg}else{aB=Y=null}}else{if(be.type==="mouseup"){if(bf===aB&&bg===Y){aP(bg)}aB=Y=null}}}}function aO(bf,be){if(be){J(bf,"mouseup",bc,false);J(bf,"mousedown",bc,false)}else{J(bf,"click",bc,false)}}function ax(bf){if(!aN){aN=true;var bg,be=ah(R,"ignore"),bh=o.links;if(bh){for(bg=0;bg<bh.length;bg++){if(!be.test(bh[bg].className)){aO(bh[bg],bf)}}}}}function a7(){var be,bf,bg={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(d.userAgent))){if(d.mimeTypes&&d.mimeTypes.length){for(be in bg){if(Object.prototype.hasOwnProperty.call(bg,be)){bf=d.mimeTypes[bg[be]];a2[be]=(bf&&bf.enabledPlugin)?"1":"0"}}}if(typeof navigator.javaEnabled!=="unknown"&&q(d.javaEnabled)&&d.javaEnabled()){a2.java="1"}if(m(w.GearsFactory)){a2.gears="1"}a2.cookie=P()}a2.res=A.width+"x"+A.height
-}a7();aC();return{getVisitorId:function(){return(L())[1]},getVisitorInfo:function(){return L()},getAttributionInfo:function(){return i()},getAttributionCampaignName:function(){return i()[0]},getAttributionCampaignKeyword:function(){return i()[1]},getAttributionReferrerTimestamp:function(){return i()[2]},getAttributionReferrerUrl:function(){return i()[3]},setTrackerUrl:function(be){N=be},setSiteId:function(be){a1=be},setCustomData:function(be,bf){if(z(be)){U=be}else{if(!U){U=[]}U[be]=bf}},getCustomData:function(){return U},setCustomVariable:function(bf,be,bi,bg){var bh;if(!q(bg)){bg="visit"}if(bf>0){be=q(be)&&!j(be)?String(be):be;bi=q(bi)&&!j(bi)?String(bi):bi;bh=[be.slice(0,a5),bi.slice(0,a5)];if(bg==="visit"||bg===2){M();Q[bf]=bh}else{if(bg==="page"||bg===3){aA[bf]=bh}}}},getCustomVariable:function(bf,bg){var be;if(!q(bg)){bg="visit"}if(bg==="page"||bg===3){be=aA[bf]}else{if(bg==="visit"||bg===2){M();be=Q[bf]}}if(!q(be)||(be&&be[0]==="")){return false}return be},deleteCustomVariable:function(be,bf){if(this.getCustomVariable(be,bf)){this.setCustomVariable(be,"","",bf)
-}},setLinkTrackingTimer:function(be){aF=be},setDownloadExtensions:function(be){an=be},addDownloadExtensions:function(be){an+="|"+be},setDomains:function(be){aG=j(be)?[be]:be;aG.push(aX)},setIgnoreClasses:function(be){R=j(be)?[be]:be},setRequestMethod:function(be){aI=be||"GET"},setReferrerUrl:function(be){aK=be},setCustomUrl:function(be){av=aW(bb,be)},setDocumentTitle:function(be){al=be},setDownloadClasses:function(be){az=j(be)?[be]:be},setLinkClasses:function(be){ae=j(be)?[be]:be},setCampaignNameKey:function(be){ap=j(be)?[be]:be},setCampaignKeywordKey:function(be){ak=j(be)?[be]:be},discardHashTag:function(be){T=be},setCookieNamePrefix:function(be){a9=be;Q=Z()},setCookieDomain:function(be){X=s(be);aC()},setCookiePath:function(be){ba=be;aC()},setVisitorCookieTimeout:function(be){ac=be*1000},setSessionCookieTimeout:function(be){ad=be*1000},setReferralCookieTimeout:function(be){aw=be*1000},setConversionAttributionFirstReferrer:function(be){au=be},disableCookies:function(){V=true;a2.cookie="0"
-},setDoNotTrack:function(bf){var be=d.doNotTrack||d.msDoNotTrack;a4=bf&&(be==="yes"||be==="1");if(a4){this.disableCookies()}},addListener:function(bf,be){aO(bf,be)},enableLinkTracking:function(be){if(l){ax(be)}else{u.push(function(){ax(be)})}},setHeartBeatTimer:function(bg,bf){var be=new Date();S=be.getTime()+bg*1000;ag=bf*1000},killFrame:function(){if(w.location!==w.top.location){w.top.location=w.location}},redirectFile:function(be){if(w.location.protocol==="file:"){w.location=be}},setCountPreRendered:function(be){ar=be},trackGoal:function(be,bg,bf){ai(function(){aD(be,bg,bf)})},trackLink:function(bf,be,bg){ai(function(){aZ(bf,be,bg)})},trackPageView:function(be,bf){if(x(N,a1)){ai(function(){b(N,a1)})}else{ai(function(){ay(be,bf)})}},trackSiteSearch:function(be,bg,bf){ai(function(){aj(be,bg,bf)})},setEcommerceView:function(bh,be,bg,bf){if(!q(bg)||!bg.length){bg=""}else{if(bg instanceof Array){bg=JSON2.stringify(bg)}}aA[5]=["_pkc",bg];if(q(bf)&&String(bf).length){aA[2]=["_pkp",bf]}if((!q(bh)||!bh.length)&&(!q(be)||!be.length)){return
-}if(q(bh)&&bh.length){aA[3]=["_pks",bh]}if(!q(be)||!be.length){be=""}aA[4]=["_pkn",be]},addEcommerceItem:function(bi,be,bg,bf,bh){if(bi.length){aQ[bi]=[bi,be,bg,bf,bh]}},trackEcommerceOrder:function(be,bi,bh,bg,bf,bj){aU(be,bi,bh,bg,bf,bj)},trackEcommerceCartUpdate:function(be){a8(be)}}}function p(){return{push:G}}J(w,"beforeunload",H,false);k();Date.prototype.getTimeAlias=Date.prototype.getTime;B=new t();for(D=0;D<_paq.length;D++){G(_paq[D])}_paq=new p();return{addPlugin:function(i,L){a[i]=L},getTracker:function(i,L){return new t(i,L)},getAsyncTracker:function(){return B}}}()),piwik_track,piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c)}e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k);
-e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}}; \ No newline at end of file
+Y=bg}else{aB=Y=null}}else{if(be.type==="mouseup"){if(bf===aB&&bg===Y){aP(bg)}aB=Y=null}}}}function aO(bf,be){if(be){J(bf,"mouseup",bc,false);J(bf,"mousedown",bc,false)}else{J(bf,"click",bc,false)}}function ax(bf){if(!aN){aN=true;var bg,be=ah(R,"ignore"),bh=o.links;if(bh){for(bg=0;bg<bh.length;bg++){if(!be.test(bh[bg].className)){aO(bh[bg],bf)}}}}}function a7(){var bf,bg,bh={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"},be=(new Regexp("Mac OS X.*Safari/")).test(d.userAgent)?w.devicePixelRatio||1:1;if(!((new RegExp("MSIE")).test(d.userAgent))){if(d.mimeTypes&&d.mimeTypes.length){for(bf in bh){if(Object.prototype.hasOwnProperty.call(bh,bf)){bg=d.mimeTypes[bh[bf]];a2[bf]=(bg&&bg.enabledPlugin)?"1":"0"}}}if(typeof navigator.javaEnabled!=="unknown"&&q(d.javaEnabled)&&d.javaEnabled()){a2.java="1"
+}if(m(w.GearsFactory)){a2.gears="1"}a2.cookie=P()}a2.res=A.width*be+"x"+A.height*be}a7();aC();return{getVisitorId:function(){return(L())[1]},getVisitorInfo:function(){return L()},getAttributionInfo:function(){return i()},getAttributionCampaignName:function(){return i()[0]},getAttributionCampaignKeyword:function(){return i()[1]},getAttributionReferrerTimestamp:function(){return i()[2]},getAttributionReferrerUrl:function(){return i()[3]},setTrackerUrl:function(be){N=be},setSiteId:function(be){a1=be},setCustomData:function(be,bf){if(z(be)){U=be}else{if(!U){U=[]}U[be]=bf}},getCustomData:function(){return U},setCustomVariable:function(bf,be,bi,bg){var bh;if(!q(bg)){bg="visit"}if(bf>0){be=q(be)&&!j(be)?String(be):be;bi=q(bi)&&!j(bi)?String(bi):bi;bh=[be.slice(0,a5),bi.slice(0,a5)];if(bg==="visit"||bg===2){M();Q[bf]=bh}else{if(bg==="page"||bg===3){aA[bf]=bh}}}},getCustomVariable:function(bf,bg){var be;if(!q(bg)){bg="visit"}if(bg==="page"||bg===3){be=aA[bf]}else{if(bg==="visit"||bg===2){M();be=Q[bf]
+}}if(!q(be)||(be&&be[0]==="")){return false}return be},deleteCustomVariable:function(be,bf){if(this.getCustomVariable(be,bf)){this.setCustomVariable(be,"","",bf)}},setLinkTrackingTimer:function(be){aF=be},setDownloadExtensions:function(be){an=be},addDownloadExtensions:function(be){an+="|"+be},setDomains:function(be){aG=j(be)?[be]:be;aG.push(aX)},setIgnoreClasses:function(be){R=j(be)?[be]:be},setRequestMethod:function(be){aI=be||"GET"},setReferrerUrl:function(be){aK=be},setCustomUrl:function(be){av=aW(bb,be)},setDocumentTitle:function(be){al=be},setDownloadClasses:function(be){az=j(be)?[be]:be},setLinkClasses:function(be){ae=j(be)?[be]:be},setCampaignNameKey:function(be){ap=j(be)?[be]:be},setCampaignKeywordKey:function(be){ak=j(be)?[be]:be},discardHashTag:function(be){T=be},setCookieNamePrefix:function(be){a9=be;Q=Z()},setCookieDomain:function(be){X=s(be);aC()},setCookiePath:function(be){ba=be;aC()},setVisitorCookieTimeout:function(be){ac=be*1000},setSessionCookieTimeout:function(be){ad=be*1000
+},setReferralCookieTimeout:function(be){aw=be*1000},setConversionAttributionFirstReferrer:function(be){au=be},disableCookies:function(){V=true;a2.cookie="0"},setDoNotTrack:function(bf){var be=d.doNotTrack||d.msDoNotTrack;a4=bf&&(be==="yes"||be==="1");if(a4){this.disableCookies()}},addListener:function(bf,be){aO(bf,be)},enableLinkTracking:function(be){if(l){ax(be)}else{u.push(function(){ax(be)})}},setHeartBeatTimer:function(bg,bf){var be=new Date();S=be.getTime()+bg*1000;ag=bf*1000},killFrame:function(){if(w.location!==w.top.location){w.top.location=w.location}},redirectFile:function(be){if(w.location.protocol==="file:"){w.location=be}},setCountPreRendered:function(be){ar=be},trackGoal:function(be,bg,bf){ai(function(){aD(be,bg,bf)})},trackLink:function(bf,be,bg){ai(function(){aZ(bf,be,bg)})},trackPageView:function(be,bf){if(x(N,a1)){ai(function(){b(N,a1)})}else{ai(function(){ay(be,bf)})}},trackSiteSearch:function(be,bg,bf){ai(function(){aj(be,bg,bf)})},setEcommerceView:function(bh,be,bg,bf){if(!q(bg)||!bg.length){bg=""
+}else{if(bg instanceof Array){bg=JSON2.stringify(bg)}}aA[5]=["_pkc",bg];if(q(bf)&&String(bf).length){aA[2]=["_pkp",bf]}if((!q(bh)||!bh.length)&&(!q(be)||!be.length)){return}if(q(bh)&&bh.length){aA[3]=["_pks",bh]}if(!q(be)||!be.length){be=""}aA[4]=["_pkn",be]},addEcommerceItem:function(bi,be,bg,bf,bh){if(bi.length){aQ[bi]=[bi,be,bg,bf,bh]}},trackEcommerceOrder:function(be,bi,bh,bg,bf,bj){aU(be,bi,bh,bg,bf,bj)},trackEcommerceCartUpdate:function(be){a8(be)}}}function p(){return{push:G}}J(w,"beforeunload",H,false);k();Date.prototype.getTimeAlias=Date.prototype.getTime;B=new t();for(D=0;D<_paq.length;D++){G(_paq[D])}_paq=new p();return{addPlugin:function(i,L){a[i]=L},getTracker:function(i,L){return new t(i,L)},getAsyncTracker:function(){return B}}}()),piwik_track,piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");
+if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c)}e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}}; \ No newline at end of file