PageSourceSearch

https://prototypr.io/js/script.exclusions.local.manual.outbound-links.pageview-props.tagged-events.js

js prototypr.io collected 2026-09-24 15:16:52 UTC 3,174 bytes, 1 lines download raw bytes

1!function(){"use strict";var u=window.location,l=window.document,c=l.currentScript,s=c.getAttribute("data-api")||new URL(c.src).origin+"/api/event",p=c.getAttribute("data-domain");function f(e,t){e&&console.warn("Ignoring Event: "+e),t&&t.callback&&t.callback()}function e(e,t){try{if("true"===window.localStorage.plausible_ignore)return f("localStorage flag",t)}catch(e){}var r=c&&c.getAttribute("data-include"),a=c&&c.getAttribute("data-exclude");if("pageview"===e){r=!r||r.split(",").some(n),a=a&&a.split(",").some(n);if(!r||a)return f("exclusion rule",t)}function n(e){return u.pathname.match(new RegExp("^"+e.trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$"))}var r={},a=(r.n=e,r.u=t&&t.u?t.u:u.href,r.d=p,r.r=l.referrer||null,t&&t.meta&&(r.m=JSON.stringify(t.meta)),t&&t.props&&(r.p=t.props),c.getAttributeNames().filter(function(e){return"event-"===e.substring(0,6)})),i=r.p||{},o=(a.forEach(function(e){var t=e.replace("event-",""),e=c.getAttribute(e);i[t]=i[t]||e}),r.p=i,new XMLHttpRequest);o.open("POST",s,!0),o.setRequestHeader("Content-Type","text/plain"),o.send(JSON.stringify(r)),o.onreadystatechange=function(){4===o.readyState&&t&&t.callback&&t.callback({status:o.status})}}var t=window.plausible&&window.plausible.q||[];window.plausible=e;for(var r=0;r<t.length;r++)e.apply(this,t[r]);function d(e){return e&&e.tagName&&"a"===e.tagName.toLowerCase()}var m=1;function a(e){var t,r;if("auxclick"!==e.type||e.button===m)return(t=function(e){for(;e&&(void 0===e.tagName||!d(e)||!e.href);)e=e.parentNode;return e}(e.target))&&t.href&&t.href.split("?")[0],!function e(t,r){if(!t||b<r)return!1;if(h(t))return!0;return e(t.parentNode,r+1)}(t,0)&&(r=t)&&r.href&&r.host&&r.host!==u.host?g(e,t,{name:"Outbound Link: Click",props:{url:t.href}}):void 0}function g(e,t,r){var a,n=!1;function i(){n||(n=!0,window.location=t.href)}!function(e,t){if(!e.defaultPrevented)return t=!t.target||t.target.match(/^_(self|parent|top)$/i),e=!(e.ctrlKey||e.metaKey||e.shiftKey)&&"click"===e.type,t&&e}(e,t)?(a={props:r.props},plausible(r.name,a)):(a={props:r.props,callback:i},plausible(r.name,a),setTimeout(i,5e3),e.preventDefault())}function v(e){var e=h(e)?e:e&&e.parentNode,t={name:null,props:{}},r=e&&e.classList;if(r)for(var a=0;a<r.length;a++){var n,i=r.item(a).match(/plausible-event-(.+)(=|--)(.+)/);i&&(n=i[1],i=i[3].replace(/\+/g," "),"name"==n.toLowerCase()?t.name=i:t.props[n]=i)}return t}l.addEventListener("click",a),l.addEventListener("auxclick",a);var b=3;function n(e){if("auxclick"!==e.type||e.button===m){for(var t,r,a,n,i=e.target,o=0;o<=b&&i;o++){if((a=i)&&a.tagName&&"form"===a.tagName.toLowerCase())return;d(i)&&(t=i),h(i)&&(r=i),i=i.parentNode}r&&(n=v(r),t?(n.props.url=t.href,g(e,t,n)):((e={}).props=n.props,plausible(n.name,e)))}}function h(e){var t=e&&e.classList;if(t)for(var r=0;r<t.length;r++)if(t.item(r).match(/plausible-event-name(=|--)(.+)/))return!0;return!1}l.addEventListener("submit",function(e){var t,r=e.target,a=v(r);function n(){t||(t=!0,r.submit())}a.name&&(e.preventDefault(),t=!1,setTimeout(n,5e3),e={props:a.props,callback:n},plausible(a.name,e))}),l.addEventListener("click",n),l.addEventListener("auxclick",n)}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.