From 62c5bfcbf8e0e36c8136a18e64b2a4dd20f7badb Mon Sep 17 00:00:00 2001 From: Uku Taht <uku.taht@gmail.com> Date: Fri, 13 Aug 2021 17:21:37 +0300 Subject: [PATCH] Use unless instead of if --- priv/tracker/js/analytics.js | 2 +- priv/tracker/js/plausible.compat.exclusions.hash.js | 2 +- priv/tracker/js/plausible.compat.exclusions.hash.local.js | 1 + .../plausible.compat.exclusions.hash.local.outbound-links.js | 1 + .../js/plausible.compat.exclusions.hash.outbound-links.js | 2 +- priv/tracker/js/plausible.compat.exclusions.js | 2 +- priv/tracker/js/plausible.compat.exclusions.local.js | 1 + .../js/plausible.compat.exclusions.local.outbound-links.js | 1 + priv/tracker/js/plausible.compat.exclusions.outbound-links.js | 2 +- priv/tracker/js/plausible.compat.hash.js | 2 +- priv/tracker/js/plausible.compat.hash.local.js | 1 + priv/tracker/js/plausible.compat.hash.local.outbound-links.js | 1 + priv/tracker/js/plausible.compat.hash.outbound-links.js | 2 +- priv/tracker/js/plausible.compat.js | 2 +- priv/tracker/js/plausible.compat.local.js | 1 + priv/tracker/js/plausible.compat.local.outbound-links.js | 1 + priv/tracker/js/plausible.compat.outbound-links.js | 2 +- priv/tracker/js/plausible.exclusions.hash.js | 2 +- priv/tracker/js/plausible.exclusions.hash.local.js | 1 + .../js/plausible.exclusions.hash.local.outbound-links.js | 1 + priv/tracker/js/plausible.exclusions.hash.outbound-links.js | 2 +- priv/tracker/js/plausible.exclusions.js | 2 +- priv/tracker/js/plausible.exclusions.local.js | 1 + priv/tracker/js/plausible.exclusions.local.outbound-links.js | 1 + priv/tracker/js/plausible.exclusions.outbound-links.js | 2 +- priv/tracker/js/plausible.hash.js | 2 +- priv/tracker/js/plausible.hash.local.js | 1 + priv/tracker/js/plausible.hash.local.outbound-links.js | 1 + priv/tracker/js/plausible.hash.outbound-links.js | 2 +- priv/tracker/js/plausible.js | 2 +- priv/tracker/js/plausible.local.js | 1 + priv/tracker/js/plausible.local.outbound-links.js | 1 + priv/tracker/js/plausible.outbound-links.js | 2 +- tracker/src/plausible.js | 4 ++-- 34 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 priv/tracker/js/plausible.compat.exclusions.hash.local.js create mode 100644 priv/tracker/js/plausible.compat.exclusions.hash.local.outbound-links.js create mode 100644 priv/tracker/js/plausible.compat.exclusions.local.js create mode 100644 priv/tracker/js/plausible.compat.exclusions.local.outbound-links.js create mode 100644 priv/tracker/js/plausible.compat.hash.local.js create mode 100644 priv/tracker/js/plausible.compat.hash.local.outbound-links.js create mode 100644 priv/tracker/js/plausible.compat.local.js create mode 100644 priv/tracker/js/plausible.compat.local.outbound-links.js create mode 100644 priv/tracker/js/plausible.exclusions.hash.local.js create mode 100644 priv/tracker/js/plausible.exclusions.hash.local.outbound-links.js create mode 100644 priv/tracker/js/plausible.exclusions.local.js create mode 100644 priv/tracker/js/plausible.exclusions.local.outbound-links.js create mode 100644 priv/tracker/js/plausible.hash.local.js create mode 100644 priv/tracker/js/plausible.hash.local.outbound-links.js create mode 100644 priv/tracker/js/plausible.local.js create mode 100644 priv/tracker/js/plausible.local.outbound-links.js diff --git a/priv/tracker/js/analytics.js b/priv/tracker/js/analytics.js index 82c38d08..be4dc37b 100644 --- a/priv/tracker/js/analytics.js +++ b/priv/tracker/js/analytics.js @@ -1 +1 @@ -!function(){"use strict";var t,a=window.location,o=window.document,r=o.currentScript,s=r.getAttribute("data-api")||new URL(r.src).origin+"/api/event",l=window.localStorage.plausible_ignore;function w(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==l)return w("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}var n,p=window.history;p.pushState&&(n=p.pushState,p.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var d=window.plausible&&window.plausible.q||[];window.plausible=e;for(var u=0;u<d.length;u++)e.apply(this,d[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){t||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var t,a=window.location,o=window.document,r=o.currentScript,s=r.getAttribute("data-api")||new URL(r.src).origin+"/api/event",l=window.localStorage.plausible_ignore;function w(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==l)return w("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}var n,p=window.history;p.pushState&&(n=p.pushState,p.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var d=window.plausible&&window.plausible.q||[];window.plausible=e;for(var u=0;u<d.length;u++)e.apply(this,d[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){t||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.hash.js b/priv/tracker/js/plausible.compat.exclusions.hash.js index 12640404..7f1fd740 100644 --- a/priv/tracker/js/plausible.compat.exclusions.hash.js +++ b/priv/tracker/js/plausible.compat.exclusions.hash.js @@ -1 +1 @@ -!function(){"use strict";var e,t,i,n,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),w=window.localStorage.plausible_ignore,d=l&&l.getAttribute("data-exclude").split(",");function p(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==w)return p("localStorage flag");if(d)for(var i=0;i<d.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+d[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return p("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function c(){n=r.pathname,a("pageview")}window.addEventListener("hashchange",c);var u=window.plausible&&window.plausible.q||[];window.plausible=a;for(var g=0;g<u.length;g++)a.apply(this,u[g]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||c()}):c()}(); \ No newline at end of file +!function(){"use strict";var e,t,i,n,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),w=window.localStorage.plausible_ignore,d=l&&l.getAttribute("data-exclude").split(",");function p(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==w)return p("localStorage flag");if(d)for(var i=0;i<d.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+d[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return p("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function c(){n=r.pathname,a("pageview")}window.addEventListener("hashchange",c);var u=window.plausible&&window.plausible.q||[];window.plausible=a;for(var g=0;g<u.length;g++)a.apply(this,u[g]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||c()}):c()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.hash.local.js b/priv/tracker/js/plausible.compat.exclusions.hash.local.js new file mode 100644 index 00000000..f240ccef --- /dev/null +++ b/priv/tracker/js/plausible.compat.exclusions.hash.local.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,i,n,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),w=window.localStorage.plausible_ignore,d=l&&l.getAttribute("data-exclude").split(",");function p(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==w)return p("localStorage flag");if(d)for(var i=0;i<d.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+d[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return p("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function u(){n=r.pathname,a("pageview")}window.addEventListener("hashchange",u);var c=window.plausible&&window.plausible.q||[];window.plausible=a;for(var g=0;g<c.length;g++)a.apply(this,c[g]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||u()}):u()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.hash.local.outbound-links.js b/priv/tracker/js/plausible.compat.exclusions.hash.local.outbound-links.js new file mode 100644 index 00000000..174d089b --- /dev/null +++ b/priv/tracker/js/plausible.compat.exclusions.hash.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,i,n,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),p=window.localStorage.plausible_ignore,c=l&&l.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return d("localStorage flag");if(c)for(var i=0;i<c.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+c[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function u(){n=r.pathname,a("pageview")}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",u),o.addEventListener("click",w),o.addEventListener("auxclick",w);var g=window.plausible&&window.plausible.q||[];window.plausible=a;for(var f=0;f<g.length;f++)a.apply(this,g[f]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||u()}):u()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.hash.outbound-links.js b/priv/tracker/js/plausible.compat.exclusions.hash.outbound-links.js index c33e9f32..2db0be13 100644 --- a/priv/tracker/js/plausible.compat.exclusions.hash.outbound-links.js +++ b/priv/tracker/js/plausible.compat.exclusions.hash.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var e,t,i,a,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),c=window.localStorage.plausible_ignore,p=l&&l.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function n(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==c)return d("localStorage flag");if(p)for(var i=0;i<p.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+p[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var a={};a.n=e,a.u=r.href,a.d=l.getAttribute("data-domain"),a.r=o.referrer||null,a.w=window.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props)),a.h=1;var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function u(){a=r.pathname,n("pageview")}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,a="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!a||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",u),o.addEventListener("click",w),o.addEventListener("auxclick",w);var h=window.plausible&&window.plausible.q||[];window.plausible=n;for(var f=0;f<h.length;f++)n.apply(this,h[f]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){a||"visible"!==o.visibilityState||u()}):u()}(); \ No newline at end of file +!function(){"use strict";var e,t,i,a,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),c=window.localStorage.plausible_ignore,p=l&&l.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function n(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==c)return d("localStorage flag");if(p)for(var i=0;i<p.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+p[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var a={};a.n=e,a.u=r.href,a.d=l.getAttribute("data-domain"),a.r=o.referrer||null,a.w=window.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props)),a.h=1;var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function u(){a=r.pathname,n("pageview")}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,a="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!a||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",u),o.addEventListener("click",w),o.addEventListener("auxclick",w);var h=window.plausible&&window.plausible.q||[];window.plausible=n;for(var f=0;f<h.length;f++)n.apply(this,h[f]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){a||"visible"!==o.visibilityState||u()}):u()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.js b/priv/tracker/js/plausible.compat.exclusions.js index 24d424f6..e63cd318 100644 --- a/priv/tracker/js/plausible.compat.exclusions.js +++ b/priv/tracker/js/plausible.compat.exclusions.js @@ -1 +1 @@ -!function(){"use strict";var t,e,i,n,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(t=l.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),p=window.localStorage.plausible_ignore,w=l&&l.getAttribute("data-exclude").split(",");function d(t){console.warn("Ignoring Event: "+t)}function a(t,e){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return d("localStorage flag");if(w)for(var i=0;i<w.length;i++)if("pageview"==t&&r.pathname.match(new RegExp("^"+w[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=t,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,e&&e.meta&&(n.m=JSON.stringify(e.meta)),e&&e.props&&(n.p=JSON.stringify(e.props));var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&e&&e.callback&&e.callback()}}}function u(){n!==r.pathname&&(n=r.pathname,a("pageview"))}var c,g=window.history;g.pushState&&(c=g.pushState,g.pushState=function(){c.apply(this,arguments),u()},window.addEventListener("popstate",u));var h=window.plausible&&window.plausible.q||[];window.plausible=a;for(var f=0;f<h.length;f++)a.apply(this,h[f]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||u()}):u()}(); \ No newline at end of file +!function(){"use strict";var t,e,i,n,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(t=l.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),p=window.localStorage.plausible_ignore,w=l&&l.getAttribute("data-exclude").split(",");function d(t){console.warn("Ignoring Event: "+t)}function a(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return d("localStorage flag");if(w)for(var i=0;i<w.length;i++)if("pageview"==t&&r.pathname.match(new RegExp("^"+w[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=t,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,e&&e.meta&&(n.m=JSON.stringify(e.meta)),e&&e.props&&(n.p=JSON.stringify(e.props));var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&e&&e.callback&&e.callback()}}}function u(){n!==r.pathname&&(n=r.pathname,a("pageview"))}var c,g=window.history;g.pushState&&(c=g.pushState,g.pushState=function(){c.apply(this,arguments),u()},window.addEventListener("popstate",u));var h=window.plausible&&window.plausible.q||[];window.plausible=a;for(var f=0;f<h.length;f++)a.apply(this,h[f]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||u()}):u()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.local.js b/priv/tracker/js/plausible.compat.exclusions.local.js new file mode 100644 index 00000000..2e60d2bd --- /dev/null +++ b/priv/tracker/js/plausible.compat.exclusions.local.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,i,n,r=window.location,o=window.document,l=o.getElementById("plausible"),p=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore,w=l&&l.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return d("localStorage flag");if(w)for(var i=0;i<w.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+w[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props));var a=new XMLHttpRequest;a.open("POST",p,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function u(){n!==r.pathname&&(n=r.pathname,a("pageview"))}var c,g=window.history;g.pushState&&(c=g.pushState,g.pushState=function(){c.apply(this,arguments),u()},window.addEventListener("popstate",u));var f=window.plausible&&window.plausible.q||[];window.plausible=a;for(var h=0;h<f.length;h++)a.apply(this,f[h]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||u()}):u()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.local.outbound-links.js b/priv/tracker/js/plausible.compat.exclusions.local.outbound-links.js new file mode 100644 index 00000000..9d1a1c4d --- /dev/null +++ b/priv/tracker/js/plausible.compat.exclusions.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,i,a,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),p=window.localStorage.plausible_ignore,d=l&&l.getAttribute("data-exclude").split(",");function u(e){console.warn("Ignoring Event: "+e)}function n(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return u("localStorage flag");if(d)for(var i=0;i<d.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+d[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return u("exclusion rule");var a={};a.n=e,a.u=r.href,a.d=l.getAttribute("data-domain"),a.r=o.referrer||null,a.w=window.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function c(){a!==r.pathname&&(a=r.pathname,n("pageview"))}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,a="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!a||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}var h,f=window.history;f.pushState&&(h=f.pushState,f.pushState=function(){h.apply(this,arguments),c()},window.addEventListener("popstate",c)),o.addEventListener("click",w),o.addEventListener("auxclick",w);var g=window.plausible&&window.plausible.q||[];window.plausible=n;for(var v=0;v<g.length;v++)n.apply(this,g[v]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){a||"visible"!==o.visibilityState||c()}):c()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.exclusions.outbound-links.js b/priv/tracker/js/plausible.compat.exclusions.outbound-links.js index cc9543d6..18283594 100644 --- a/priv/tracker/js/plausible.compat.exclusions.outbound-links.js +++ b/priv/tracker/js/plausible.compat.exclusions.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var e,t,i,a,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),p=window.localStorage.plausible_ignore,c=l&&l.getAttribute("data-exclude").split(",");function u(e){console.warn("Ignoring Event: "+e)}function n(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return u("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return u("localStorage flag");if(c)for(var i=0;i<c.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+c[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return u("exclusion rule");var a={};a.n=e,a.u=r.href,a.d=l.getAttribute("data-domain"),a.r=o.referrer||null,a.w=window.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function d(){a!==r.pathname&&(a=r.pathname,n("pageview"))}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,a="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!a||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}var h,f=window.history;f.pushState&&(h=f.pushState,f.pushState=function(){h.apply(this,arguments),d()},window.addEventListener("popstate",d)),o.addEventListener("click",w),o.addEventListener("auxclick",w);var g=window.plausible&&window.plausible.q||[];window.plausible=n;for(var v=0;v<g.length;v++)n.apply(this,g[v]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){a||"visible"!==o.visibilityState||d()}):d()}(); \ No newline at end of file +!function(){"use strict";var e,t,i,a,r=window.location,o=window.document,l=o.getElementById("plausible"),s=l.getAttribute("data-api")||(e=l.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),p=window.localStorage.plausible_ignore,c=l&&l.getAttribute("data-exclude").split(",");function u(e){console.warn("Ignoring Event: "+e)}function n(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return u("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return u("localStorage flag");if(c)for(var i=0;i<c.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+c[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return u("exclusion rule");var a={};a.n=e,a.u=r.href,a.d=l.getAttribute("data-domain"),a.r=o.referrer||null,a.w=window.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function d(){a!==r.pathname&&(a=r.pathname,n("pageview"))}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,a="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!a||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}var h,f=window.history;f.pushState&&(h=f.pushState,f.pushState=function(){h.apply(this,arguments),d()},window.addEventListener("popstate",d)),o.addEventListener("click",w),o.addEventListener("auxclick",w);var g=window.plausible&&window.plausible.q||[];window.plausible=n;for(var v=0;v<g.length;v++)n.apply(this,g[v]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){a||"visible"!==o.visibilityState||d()}):d()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.hash.js b/priv/tracker/js/plausible.compat.hash.js index 39f72338..e22c5f1f 100644 --- a/priv/tracker/js/plausible.compat.hash.js +++ b/priv/tracker/js/plausible.compat.hash.js @@ -1 +1 @@ -!function(){"use strict";var e,t,i,n,a=window.location,o=window.document,r=o.getElementById("plausible"),l=r.getAttribute("data-api")||(e=r.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function w(e){console.warn("Ignoring Event: "+e)}function d(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return w("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function p(){n=a.pathname,d("pageview")}window.addEventListener("hashchange",p);var c=window.plausible&&window.plausible.q||[];window.plausible=d;for(var u=0;u<c.length;u++)d.apply(this,c[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||p()}):p()}(); \ No newline at end of file +!function(){"use strict";var e,t,i,n,a=window.location,o=window.document,r=o.getElementById("plausible"),l=r.getAttribute("data-api")||(e=r.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function w(e){console.warn("Ignoring Event: "+e)}function d(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return w("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function p(){n=a.pathname,d("pageview")}window.addEventListener("hashchange",p);var c=window.plausible&&window.plausible.q||[];window.plausible=d;for(var u=0;u<c.length;u++)d.apply(this,c[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||p()}):p()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.hash.local.js b/priv/tracker/js/plausible.compat.hash.local.js new file mode 100644 index 00000000..0e6671fa --- /dev/null +++ b/priv/tracker/js/plausible.compat.hash.local.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,i,n,a=window.location,r=window.document,o=r.getElementById("plausible"),l=o.getAttribute("data-api")||(e=o.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),w=window.localStorage.plausible_ignore;function d(e,t){var i,n;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=w?((i={}).n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1,(n=new XMLHttpRequest).open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}):console.warn("Ignoring Event: localStorage flag"))}function s(){n=a.pathname,d("pageview")}window.addEventListener("hashchange",s);var p=window.plausible&&window.plausible.q||[];window.plausible=d;for(var c=0;c<p.length;c++)d.apply(this,p[c]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){n||"visible"!==r.visibilityState||s()}):s()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.hash.local.outbound-links.js b/priv/tracker/js/plausible.compat.hash.local.outbound-links.js new file mode 100644 index 00000000..3a8df1ab --- /dev/null +++ b/priv/tracker/js/plausible.compat.hash.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,i,n,a=window.location,r=window.document,o=r.getElementById("plausible"),l=o.getAttribute("data-api")||(e=o.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function d(e,t){var i,n;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=s?((i={}).n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1,(n=new XMLHttpRequest).open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}):console.warn("Ignoring Event: localStorage flag"))}function p(){n=a.pathname,d("pageview")}function c(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){a.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",p),r.addEventListener("click",c),r.addEventListener("auxclick",c);var w=window.plausible&&window.plausible.q||[];window.plausible=d;for(var u=0;u<w.length;u++)d.apply(this,w[u]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){n||"visible"!==r.visibilityState||p()}):p()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.hash.outbound-links.js b/priv/tracker/js/plausible.compat.hash.outbound-links.js index bcea218e..a8845d3e 100644 --- a/priv/tracker/js/plausible.compat.hash.outbound-links.js +++ b/priv/tracker/js/plausible.compat.hash.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var e,t,i,n,a=window.location,r=window.document,o=r.getElementById("plausible"),l=o.getAttribute("data-api")||(e=o.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function d(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return c("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return c("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function p(){n=a.pathname,d("pageview")}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){a.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",p),r.addEventListener("click",w),r.addEventListener("auxclick",w);var u=window.plausible&&window.plausible.q||[];window.plausible=d;for(var h=0;h<u.length;h++)d.apply(this,u[h]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){n||"visible"!==r.visibilityState||p()}):p()}(); \ No newline at end of file +!function(){"use strict";var e,t,i,n,a=window.location,r=window.document,o=r.getElementById("plausible"),l=o.getAttribute("data-api")||(e=o.src.split("/"),t=e[0],i=e[2],t+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function d(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return c("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return c("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function p(){n=a.pathname,d("pageview")}function w(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){a.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",p),r.addEventListener("click",w),r.addEventListener("auxclick",w);var u=window.plausible&&window.plausible.q||[];window.plausible=d;for(var h=0;h<u.length;h++)d.apply(this,u[h]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){n||"visible"!==r.visibilityState||p()}):p()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.js b/priv/tracker/js/plausible.compat.js index 8b0776a9..89d142da 100644 --- a/priv/tracker/js/plausible.compat.js +++ b/priv/tracker/js/plausible.compat.js @@ -1 +1 @@ -!function(){"use strict";var t,e,i,n,a=window.location,o=window.document,r=o.getElementById("plausible"),l=r.getAttribute("data-api")||(t=r.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function p(t){console.warn("Ignoring Event: "+t)}function w(t,e){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return p("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function d(){n!==a.pathname&&(n=a.pathname,w("pageview"))}var u,c=window.history;c.pushState&&(u=c.pushState,c.pushState=function(){u.apply(this,arguments),d()},window.addEventListener("popstate",d));var h=window.plausible&&window.plausible.q||[];window.plausible=w;for(var f=0;f<h.length;f++)w.apply(this,h[f]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||d()}):d()}(); \ No newline at end of file +!function(){"use strict";var t,e,i,n,a=window.location,o=window.document,r=o.getElementById("plausible"),l=r.getAttribute("data-api")||(t=r.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function p(t){console.warn("Ignoring Event: "+t)}function w(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return p("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function d(){n!==a.pathname&&(n=a.pathname,w("pageview"))}var u,c=window.history;c.pushState&&(u=c.pushState,c.pushState=function(){u.apply(this,arguments),d()},window.addEventListener("popstate",d));var h=window.plausible&&window.plausible.q||[];window.plausible=w;for(var f=0;f<h.length;f++)w.apply(this,h[f]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||d()}):d()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.local.js b/priv/tracker/js/plausible.compat.local.js new file mode 100644 index 00000000..49b383ed --- /dev/null +++ b/priv/tracker/js/plausible.compat.local.js @@ -0,0 +1 @@ +!function(){"use strict";var t,e,i,n,a=window.location,o=window.document,r=o.getElementById("plausible"),s=r.getAttribute("data-api")||(t=r.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),l=window.localStorage.plausible_ignore;function p(t,e){var i,n;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=l?((i={}).n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props)),(n=new XMLHttpRequest).open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}):console.warn("Ignoring Event: localStorage flag"))}function w(){n!==a.pathname&&(n=a.pathname,p("pageview"))}var d,u=window.history;u.pushState&&(d=u.pushState,u.pushState=function(){d.apply(this,arguments),w()},window.addEventListener("popstate",w));var c=window.plausible&&window.plausible.q||[];window.plausible=p;for(var g=0;g<c.length;g++)p.apply(this,c[g]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){n||"visible"!==o.visibilityState||w()}):w()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.local.outbound-links.js b/priv/tracker/js/plausible.compat.local.outbound-links.js new file mode 100644 index 00000000..b4484481 --- /dev/null +++ b/priv/tracker/js/plausible.compat.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var t,e,i,a,n=window.location,r=window.document,o=r.getElementById("plausible"),s=o.getAttribute("data-api")||(t=o.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),l=window.localStorage.plausible_ignore;function p(t,e){var i,a;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=l?((i={}).n=t,i.u=n.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props)),(a=new XMLHttpRequest).open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(i)),a.onreadystatechange=function(){4==a.readyState&&e&&e.callback&&e.callback()}):console.warn("Ignoring Event: localStorage flag"))}function d(){a!==n.pathname&&(a=n.pathname,p("pageview"))}function w(t){for(var e=t.target,i="auxclick"==t.type&&2==t.which,a="click"==t.type;e&&(void 0===e.tagName||"a"!=e.tagName.toLowerCase()||!e.href);)e=e.parentNode;e&&e.href&&e.host&&e.host!==n.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:e.href}}),e.target&&!e.target.match(/^_(self|parent|top)$/i)||t.ctrlKey||t.metaKey||t.shiftKey||!a||(setTimeout(function(){n.href=e.href},150),t.preventDefault()))}var c,u=window.history;u.pushState&&(c=u.pushState,u.pushState=function(){c.apply(this,arguments),d()},window.addEventListener("popstate",d)),r.addEventListener("click",w),r.addEventListener("auxclick",w);var h=window.plausible&&window.plausible.q||[];window.plausible=p;for(var f=0;f<h.length;f++)p.apply(this,h[f]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){a||"visible"!==r.visibilityState||d()}):d()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.compat.outbound-links.js b/priv/tracker/js/plausible.compat.outbound-links.js index 32bae3dc..a9cbb675 100644 --- a/priv/tracker/js/plausible.compat.outbound-links.js +++ b/priv/tracker/js/plausible.compat.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var t,e,i,n,a=window.location,r=window.document,o=r.getElementById("plausible"),l=o.getAttribute("data-api")||(t=o.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function p(t){console.warn("Ignoring Event: "+t)}function d(t,e){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return p("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function c(){n!==a.pathname&&(n=a.pathname,d("pageview"))}function u(t){for(var e=t.target,i="auxclick"==t.type&&2==t.which,n="click"==t.type;e&&(void 0===e.tagName||"a"!=e.tagName.toLowerCase()||!e.href);)e=e.parentNode;e&&e.href&&e.host&&e.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:e.href}}),e.target&&!e.target.match(/^_(self|parent|top)$/i)||t.ctrlKey||t.metaKey||t.shiftKey||!n||(setTimeout(function(){a.href=e.href},150),t.preventDefault()))}var w,h=window.history;h.pushState&&(w=h.pushState,h.pushState=function(){w.apply(this,arguments),c()},window.addEventListener("popstate",c)),r.addEventListener("click",u),r.addEventListener("auxclick",u);var f=window.plausible&&window.plausible.q||[];window.plausible=d;for(var g=0;g<f.length;g++)d.apply(this,f[g]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){n||"visible"!==r.visibilityState||c()}):c()}(); \ No newline at end of file +!function(){"use strict";var t,e,i,n,a=window.location,r=window.document,o=r.getElementById("plausible"),l=o.getAttribute("data-api")||(t=o.src.split("/"),e=t[0],i=t[2],e+"//"+i+"/api/event"),s=window.localStorage.plausible_ignore;function p(t){console.warn("Ignoring Event: "+t)}function d(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return p("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function c(){n!==a.pathname&&(n=a.pathname,d("pageview"))}function u(t){for(var e=t.target,i="auxclick"==t.type&&2==t.which,n="click"==t.type;e&&(void 0===e.tagName||"a"!=e.tagName.toLowerCase()||!e.href);)e=e.parentNode;e&&e.href&&e.host&&e.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:e.href}}),e.target&&!e.target.match(/^_(self|parent|top)$/i)||t.ctrlKey||t.metaKey||t.shiftKey||!n||(setTimeout(function(){a.href=e.href},150),t.preventDefault()))}var w,h=window.history;h.pushState&&(w=h.pushState,h.pushState=function(){w.apply(this,arguments),c()},window.addEventListener("popstate",c)),r.addEventListener("click",u),r.addEventListener("auxclick",u);var f=window.plausible&&window.plausible.q||[];window.plausible=d;for(var g=0;g<f.length;g++)d.apply(this,f[g]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){n||"visible"!==r.visibilityState||c()}):c()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.hash.js b/priv/tracker/js/plausible.exclusions.hash.js index e0d2f63c..8dc19b34 100644 --- a/priv/tracker/js/plausible.exclusions.hash.js +++ b/priv/tracker/js/plausible.exclusions.hash.js @@ -1 +1 @@ -!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",w=window.localStorage.plausible_ignore,d=l&&l.getAttribute("data-exclude").split(",");function p(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==w)return p("localStorage flag");if(d)for(var i=0;i<d.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+d[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return p("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e=r.pathname,t("pageview")}window.addEventListener("hashchange",i);var n=window.plausible&&window.plausible.q||[];window.plausible=t;for(var a=0;a<n.length;a++)t.apply(this,n[a]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",w=window.localStorage.plausible_ignore,d=l&&l.getAttribute("data-exclude").split(",");function p(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==w)return p("localStorage flag");if(d)for(var i=0;i<d.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+d[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return p("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e=r.pathname,t("pageview")}window.addEventListener("hashchange",i);var n=window.plausible&&window.plausible.q||[];window.plausible=t;for(var a=0;a<n.length;a++)t.apply(this,n[a]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.hash.local.js b/priv/tracker/js/plausible.exclusions.hash.local.js new file mode 100644 index 00000000..ddd99148 --- /dev/null +++ b/priv/tracker/js/plausible.exclusions.hash.local.js @@ -0,0 +1 @@ +!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,w=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",d=window.localStorage.plausible_ignore,s=l&&l.getAttribute("data-exclude").split(",");function p(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==d)return p("localStorage flag");if(s)for(var i=0;i<s.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+s[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return p("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",w,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e=r.pathname,t("pageview")}window.addEventListener("hashchange",i);var n=window.plausible&&window.plausible.q||[];window.plausible=t;for(var a=0;a<n.length;a++)t.apply(this,n[a]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.hash.local.outbound-links.js b/priv/tracker/js/plausible.exclusions.hash.local.outbound-links.js new file mode 100644 index 00000000..979ed20c --- /dev/null +++ b/priv/tracker/js/plausible.exclusions.hash.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",c=window.localStorage.plausible_ignore,p=l&&l.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==c)return d("localStorage flag");if(p)for(var i=0;i<p.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+p[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e=r.pathname,t("pageview")}function n(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",i),o.addEventListener("click",n),o.addEventListener("auxclick",n);var a=window.plausible&&window.plausible.q||[];window.plausible=t;for(var u=0;u<a.length;u++)t.apply(this,a[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.hash.outbound-links.js b/priv/tracker/js/plausible.exclusions.hash.outbound-links.js index 00500eaf..c25ceefe 100644 --- a/priv/tracker/js/plausible.exclusions.hash.outbound-links.js +++ b/priv/tracker/js/plausible.exclusions.hash.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",c=window.localStorage.plausible_ignore,p=l&&l.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==c)return d("localStorage flag");if(p)for(var i=0;i<p.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+p[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e=r.pathname,t("pageview")}function n(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",i),o.addEventListener("click",n),o.addEventListener("auxclick",n);var a=window.plausible&&window.plausible.q||[];window.plausible=t;for(var u=0;u<a.length;u++)t.apply(this,a[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",c=window.localStorage.plausible_ignore,p=l&&l.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==c)return d("localStorage flag");if(p)for(var i=0;i<p.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+p[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e=r.pathname,t("pageview")}function n(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",i),o.addEventListener("click",n),o.addEventListener("auxclick",n);var a=window.plausible&&window.plausible.q||[];window.plausible=t;for(var u=0;u<a.length;u++)t.apply(this,a[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.js b/priv/tracker/js/plausible.exclusions.js index 16fb7ff3..e87d2b5e 100644 --- a/priv/tracker/js/plausible.exclusions.js +++ b/priv/tracker/js/plausible.exclusions.js @@ -1 +1 @@ -!function(){"use strict";var t,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",p=window.localStorage.plausible_ignore,w=l&&l.getAttribute("data-exclude").split(",");function d(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return d("localStorage flag");if(w)for(var i=0;i<w.length;i++)if("pageview"==t&&r.pathname.match(new RegExp("^"+w[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=t,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,e&&e.meta&&(n.m=JSON.stringify(e.meta)),e&&e.props&&(n.p=JSON.stringify(e.props));var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==r.pathname&&(t=r.pathname,e("pageview"))}var n,a=window.history;a.pushState&&(n=a.pushState,a.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var u=window.plausible&&window.plausible.q||[];window.plausible=e;for(var c=0;c<u.length;c++)e.apply(this,u[c]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){t||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var t,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",p=window.localStorage.plausible_ignore,w=l&&l.getAttribute("data-exclude").split(",");function d(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return d("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return d("localStorage flag");if(w)for(var i=0;i<w.length;i++)if("pageview"==t&&r.pathname.match(new RegExp("^"+w[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=t,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,e&&e.meta&&(n.m=JSON.stringify(e.meta)),e&&e.props&&(n.p=JSON.stringify(e.props));var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==r.pathname&&(t=r.pathname,e("pageview"))}var n,a=window.history;a.pushState&&(n=a.pushState,a.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var u=window.plausible&&window.plausible.q||[];window.plausible=e;for(var c=0;c<u.length;c++)e.apply(this,u[c]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){t||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.local.js b/priv/tracker/js/plausible.exclusions.local.js new file mode 100644 index 00000000..48ad1b0d --- /dev/null +++ b/priv/tracker/js/plausible.exclusions.local.js @@ -0,0 +1 @@ +!function(){"use strict";var e,r=window.location,o=window.document,p=o.currentScript,l=p.getAttribute("data-api")||new URL(p.src).origin+"/api/event",s=window.localStorage.plausible_ignore,w=p&&p.getAttribute("data-exclude").split(",");function d(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return d("localStorage flag");if(w)for(var i=0;i<w.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+w[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return d("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=p.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props));var a=new XMLHttpRequest;a.open("POST",l,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e!==r.pathname&&(e=r.pathname,t("pageview"))}var n,a=window.history;a.pushState&&(n=a.pushState,a.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var u=window.plausible&&window.plausible.q||[];window.plausible=t;for(var c=0;c<u.length;c++)t.apply(this,u[c]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.local.outbound-links.js b/priv/tracker/js/plausible.exclusions.local.outbound-links.js new file mode 100644 index 00000000..5d0834c7 --- /dev/null +++ b/priv/tracker/js/plausible.exclusions.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,p=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",s=window.localStorage.plausible_ignore,c=l&&l.getAttribute("data-exclude").split(",");function u(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return u("localStorage flag");if(c)for(var i=0;i<c.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+c[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return u("exclusion rule");var n={};n.n=e,n.u=r.href,n.d=l.getAttribute("data-domain"),n.r=o.referrer||null,n.w=window.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props));var a=new XMLHttpRequest;a.open("POST",p,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function i(){e!==r.pathname&&(e=r.pathname,t("pageview"))}function n(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}var a,d=window.history;d.pushState&&(a=d.pushState,d.pushState=function(){a.apply(this,arguments),i()},window.addEventListener("popstate",i)),o.addEventListener("click",n),o.addEventListener("auxclick",n);var w=window.plausible&&window.plausible.q||[];window.plausible=t;for(var h=0;h<w.length;h++)t.apply(this,w[h]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.outbound-links.js b/priv/tracker/js/plausible.exclusions.outbound-links.js index 9f116067..c0329ee2 100644 --- a/priv/tracker/js/plausible.exclusions.outbound-links.js +++ b/priv/tracker/js/plausible.exclusions.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",p=window.localStorage.plausible_ignore,c=l&&l.getAttribute("data-exclude").split(",");function u(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.hostname)||"file:"===r.protocol)return u("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return u("localStorage flag");if(c)for(var i=0;i<c.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+c[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return u("exclusion rule");var a={};a.n=e,a.u=r.href,a.d=l.getAttribute("data-domain"),a.r=o.referrer||null,a.w=window.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function i(){e!==r.pathname&&(e=r.pathname,t("pageview"))}function a(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,a="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!a||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}var n,d=window.history;d.pushState&&(n=d.pushState,d.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i)),o.addEventListener("click",a),o.addEventListener("auxclick",a);var w=window.plausible&&window.plausible.q||[];window.plausible=t;for(var h=0;h<w.length;h++)t.apply(this,w[h]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var e,r=window.location,o=window.document,l=o.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",p=window.localStorage.plausible_ignore,c=l&&l.getAttribute("data-exclude").split(",");function u(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r.hostname)||"file:"===r.protocol)return u("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==p)return u("localStorage flag");if(c)for(var i=0;i<c.length;i++)if("pageview"==e&&r.pathname.match(new RegExp("^"+c[i].trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$")))return u("exclusion rule");var a={};a.n=e,a.u=r.href,a.d=l.getAttribute("data-domain"),a.r=o.referrer||null,a.w=window.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function i(){e!==r.pathname&&(e=r.pathname,t("pageview"))}function a(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,a="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==r.host&&((i||a)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!a||(setTimeout(function(){r.href=t.href},150),e.preventDefault()))}var n,d=window.history;d.pushState&&(n=d.pushState,d.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i)),o.addEventListener("click",a),o.addEventListener("auxclick",a);var w=window.plausible&&window.plausible.q||[];window.plausible=t;for(var h=0;h<w.length;h++)t.apply(this,w[h]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){e||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.js b/priv/tracker/js/plausible.hash.js index edea1b51..07d81e69 100644 --- a/priv/tracker/js/plausible.hash.js +++ b/priv/tracker/js/plausible.hash.js @@ -1 +1 @@ -!function(){"use strict";var e,a=window.location,r=window.document,o=r.currentScript,l=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",s=window.localStorage.plausible_ignore;function w(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return w("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function i(){e=a.pathname,t("pageview")}window.addEventListener("hashchange",i);var n=window.plausible&&window.plausible.q||[];window.plausible=t;for(var d=0;d<n.length;d++)t.apply(this,n[d]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){e||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var e,a=window.location,r=window.document,o=r.currentScript,l=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",s=window.localStorage.plausible_ignore;function w(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return w("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function i(){e=a.pathname,t("pageview")}window.addEventListener("hashchange",i);var n=window.plausible&&window.plausible.q||[];window.plausible=t;for(var d=0;d<n.length;d++)t.apply(this,n[d]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){e||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.local.js b/priv/tracker/js/plausible.hash.local.js new file mode 100644 index 00000000..0403057e --- /dev/null +++ b/priv/tracker/js/plausible.hash.local.js @@ -0,0 +1 @@ +!function(){"use strict";var e,a=window.location,r=window.document,o=r.currentScript,w=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",d=window.localStorage.plausible_ignore;function i(e,i){var n,t;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=d?((n={}).n=e,n.u=a.href,n.d=o.getAttribute("data-domain"),n.r=r.referrer||null,n.w=window.innerWidth,i&&i.meta&&(n.m=JSON.stringify(i.meta)),i&&i.props&&(n.p=JSON.stringify(i.props)),n.h=1,(t=new XMLHttpRequest).open("POST",w,!0),t.setRequestHeader("Content-Type","text/plain"),t.send(JSON.stringify(n)),t.onreadystatechange=function(){4==t.readyState&&i&&i.callback&&i.callback()}):console.warn("Ignoring Event: localStorage flag"))}function n(){e=a.pathname,i("pageview")}window.addEventListener("hashchange",n);var t=window.plausible&&window.plausible.q||[];window.plausible=i;for(var l=0;l<t.length;l++)i.apply(this,t[l]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){e||"visible"!==r.visibilityState||n()}):n()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.local.outbound-links.js b/priv/tracker/js/plausible.hash.local.outbound-links.js new file mode 100644 index 00000000..5c78b448 --- /dev/null +++ b/priv/tracker/js/plausible.hash.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var e,a=window.location,r=window.document,o=r.currentScript,l=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",s=window.localStorage.plausible_ignore;function t(e,t){var i,n;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=s?((i={}).n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1,(n=new XMLHttpRequest).open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}):console.warn("Ignoring Event: localStorage flag"))}function i(){e=a.pathname,t("pageview")}function n(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){a.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",i),r.addEventListener("click",n),r.addEventListener("auxclick",n);var d=window.plausible&&window.plausible.q||[];window.plausible=t;for(var c=0;c<d.length;c++)t.apply(this,d[c]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){e||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.outbound-links.js b/priv/tracker/js/plausible.hash.outbound-links.js index cdffacf0..c4569b62 100644 --- a/priv/tracker/js/plausible.hash.outbound-links.js +++ b/priv/tracker/js/plausible.hash.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var e,a=window.location,r=window.document,o=r.currentScript,l=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",s=window.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return c("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return c("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function i(){e=a.pathname,t("pageview")}function n(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){a.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",i),r.addEventListener("click",n),r.addEventListener("auxclick",n);var d=window.plausible&&window.plausible.q||[];window.plausible=t;for(var p=0;p<d.length;p++)t.apply(this,d[p]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){e||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var e,a=window.location,r=window.document,o=r.currentScript,l=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",s=window.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function t(e,t){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return c("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==s)return c("localStorage flag");var i={};i.n=e,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,t&&t.meta&&(i.m=JSON.stringify(t.meta)),t&&t.props&&(i.p=JSON.stringify(t.props)),i.h=1;var n=new XMLHttpRequest;n.open("POST",l,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function i(){e=a.pathname,t("pageview")}function n(e){for(var t=e.target,i="auxclick"==e.type&&2==e.which,n="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!n||(setTimeout(function(){a.href=t.href},150),e.preventDefault()))}window.addEventListener("hashchange",i),r.addEventListener("click",n),r.addEventListener("auxclick",n);var d=window.plausible&&window.plausible.q||[];window.plausible=t;for(var p=0;p<d.length;p++)t.apply(this,d[p]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){e||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.js b/priv/tracker/js/plausible.js index 82c38d08..be4dc37b 100644 --- a/priv/tracker/js/plausible.js +++ b/priv/tracker/js/plausible.js @@ -1 +1 @@ -!function(){"use strict";var t,a=window.location,o=window.document,r=o.currentScript,s=r.getAttribute("data-api")||new URL(r.src).origin+"/api/event",l=window.localStorage.plausible_ignore;function w(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==l)return w("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}var n,p=window.history;p.pushState&&(n=p.pushState,p.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var d=window.plausible&&window.plausible.q||[];window.plausible=e;for(var u=0;u<d.length;u++)e.apply(this,d[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){t||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var t,a=window.location,o=window.document,r=o.currentScript,s=r.getAttribute("data-api")||new URL(r.src).origin+"/api/event",l=window.localStorage.plausible_ignore;function w(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==l)return w("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}var n,p=window.history;p.pushState&&(n=p.pushState,p.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var d=window.plausible&&window.plausible.q||[];window.plausible=e;for(var u=0;u<d.length;u++)e.apply(this,d[u]);"prerender"===o.visibilityState?o.addEventListener("visibilitychange",function(){t||"visible"!==o.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.local.js b/priv/tracker/js/plausible.local.js new file mode 100644 index 00000000..ed4e6a3a --- /dev/null +++ b/priv/tracker/js/plausible.local.js @@ -0,0 +1 @@ +!function(){"use strict";var t,a=window.location,r=window.document,o=r.currentScript,w=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",s=window.localStorage.plausible_ignore;function e(t,e){var i,n;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=s?((i={}).n=t,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props)),(n=new XMLHttpRequest).open("POST",w,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}):console.warn("Ignoring Event: localStorage flag"))}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}var n,p=window.history;p.pushState&&(n=p.pushState,p.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var d=window.plausible&&window.plausible.q||[];window.plausible=e;for(var l=0;l<d.length;l++)e.apply(this,d[l]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){t||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.local.outbound-links.js b/priv/tracker/js/plausible.local.outbound-links.js new file mode 100644 index 00000000..234d2d2b --- /dev/null +++ b/priv/tracker/js/plausible.local.outbound-links.js @@ -0,0 +1 @@ +!function(){"use strict";var t,a=window.location,r=window.document,o=r.currentScript,s=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",p=window.localStorage.plausible_ignore;function e(t,e){var i,n;window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=p?((i={}).n=t,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props)),(n=new XMLHttpRequest).open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}):console.warn("Ignoring Event: localStorage flag"))}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}function n(t){for(var e=t.target,i="auxclick"==t.type&&2==t.which,n="click"==t.type;e&&(void 0===e.tagName||"a"!=e.tagName.toLowerCase()||!e.href);)e=e.parentNode;e&&e.href&&e.host&&e.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:e.href}}),e.target&&!e.target.match(/^_(self|parent|top)$/i)||t.ctrlKey||t.metaKey||t.shiftKey||!n||(setTimeout(function(){a.href=e.href},150),t.preventDefault()))}var l,d=window.history;d.pushState&&(l=d.pushState,d.pushState=function(){l.apply(this,arguments),i()},window.addEventListener("popstate",i)),r.addEventListener("click",n),r.addEventListener("auxclick",n);var w=window.plausible&&window.plausible.q||[];window.plausible=e;for(var c=0;c<w.length;c++)e.apply(this,w[c]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){t||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/priv/tracker/js/plausible.outbound-links.js b/priv/tracker/js/plausible.outbound-links.js index dc2c7742..373f7a97 100644 --- a/priv/tracker/js/plausible.outbound-links.js +++ b/priv/tracker/js/plausible.outbound-links.js @@ -1 +1 @@ -!function(){"use strict";var t,a=window.location,r=window.document,o=r.currentScript,s=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",l=window.localStorage.plausible_ignore;function p(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(a.hostname)||"file:"===a.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==l)return p("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}function n(t){for(var e=t.target,i="auxclick"==t.type&&2==t.which,n="click"==t.type;e&&(void 0===e.tagName||"a"!=e.tagName.toLowerCase()||!e.href);)e=e.parentNode;e&&e.href&&e.host&&e.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:e.href}}),e.target&&!e.target.match(/^_(self|parent|top)$/i)||t.ctrlKey||t.metaKey||t.shiftKey||!n||(setTimeout(function(){a.href=e.href},150),t.preventDefault()))}var c,d=window.history;d.pushState&&(c=d.pushState,d.pushState=function(){c.apply(this,arguments),i()},window.addEventListener("popstate",i)),r.addEventListener("click",n),r.addEventListener("auxclick",n);var u=window.plausible&&window.plausible.q||[];window.plausible=e;for(var w=0;w<u.length;w++)e.apply(this,u[w]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){t||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file +!function(){"use strict";var t,a=window.location,r=window.document,o=r.currentScript,s=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",l=window.localStorage.plausible_ignore;function p(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return p("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==l)return p("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=o.getAttribute("data-domain"),i.r=r.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}function n(t){for(var e=t.target,i="auxclick"==t.type&&2==t.which,n="click"==t.type;e&&(void 0===e.tagName||"a"!=e.tagName.toLowerCase()||!e.href);)e=e.parentNode;e&&e.href&&e.host&&e.host!==a.host&&((i||n)&&plausible("Outbound Link: Click",{props:{url:e.href}}),e.target&&!e.target.match(/^_(self|parent|top)$/i)||t.ctrlKey||t.metaKey||t.shiftKey||!n||(setTimeout(function(){a.href=e.href},150),t.preventDefault()))}var c,d=window.history;d.pushState&&(c=d.pushState,d.pushState=function(){c.apply(this,arguments),i()},window.addEventListener("popstate",i)),r.addEventListener("click",n),r.addEventListener("auxclick",n);var u=window.plausible&&window.plausible.q||[];window.plausible=e;for(var w=0;w<u.length;w++)e.apply(this,u[w]);"prerender"===r.visibilityState?r.addEventListener("visibilitychange",function(){t||"visible"!==r.visibilityState||i()}):i()}(); \ No newline at end of file diff --git a/tracker/src/plausible.js b/tracker/src/plausible.js index 4ca8a906..6a6e2045 100644 --- a/tracker/src/plausible.js +++ b/tracker/src/plausible.js @@ -33,9 +33,9 @@ function trigger(eventName, options) { - {{#if !local}} + {{#unless local}} if (/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(location.hostname) || location.protocol === 'file:') return warn('localhost'); - {{/if}} + {{/unless}} if (window.phantom || window._phantom || window.__nightmare || window.navigator.webdriver || window.Cypress) return; if (plausible_ignore=="true") return warn('localStorage flag') {{#if exclusions}} -- GitLab