PageSourceSearch

https://prototypr.io/js/script.exclusions.file-downloads.hash.local.pageview-props.revenue.tagged-events.js

js prototypr.io collected 2026-09-24 15:18:27 UTC 3,917 bytes, 1 lines download raw bytes

1!function(){"use strict";var o=window.location,p=window.document,l=p.currentScript,s=l.getAttribute("data-api")||new URL(l.src).origin+"/api/event",c=l.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 n=l&&l.getAttribute("data-include"),r=l&&l.getAttribute("data-exclude");if("pageview"===e){n=!n||n.split(",").some(a),r=r&&r.split(",").some(a);if(!n||r)return f("exclusion rule",t)}function a(e){var t=o.pathname;return(t+=o.hash).match(new RegExp("^"+e.trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$"))}var n={},r=(n.n=e,n.u=o.href,n.d=c,n.r=p.referrer||null,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=t.props),t&&t.revenue&&(n.$=t.revenue),l.getAttributeNames().filter(function(e){return"event-"===e.substring(0,6)})),i=n.p||{},u=(r.forEach(function(e){var t=e.replace("event-",""),e=l.getAttribute(e);i[t]=i[t]||e}),n.p=i,n.h=1,new XMLHttpRequest);u.open("POST",s,!0),u.setRequestHeader("Content-Type","text/plain"),u.send(JSON.stringify(n)),u.onreadystatechange=function(){4===u.readyState&&t&&t.callback&&t.callback({status:u.status})}}var t=window.plausible&&window.plausible.q||[];window.plausible=e;for(var n,r=0;r<t.length;r++)e.apply(this,t[r]);function a(){n=o.pathname,e("pageview")}function v(e){return e&&e.tagName&&"a"===e.tagName.toLowerCase()}window.addEventListener("hashchange",function(){a()}),"prerender"===p.visibilityState?p.addEventListener("visibilitychange",function(){n||"visible"!==p.visibilityState||a()}):a();var d=1;function i(e){var t,n,r,a;if("auxclick"!==e.type||e.button===d)return t=function(e){for(;e&&(void 0===e.tagName||!v(e)||!e.href);)e=e.parentNode;return e}(e.target),n=t&&t.href&&t.href.split("?")[0],!function e(t,n){if(!t||y<n)return!1;if(x(t))return!0;return e(t.parentNode,n+1)}(t,0)&&(r=n)&&(a=r.split(".").pop(),w.some(function(e){return e===a}))?m(e,t,{name:"File Download",props:{url:n}}):void 0}function m(e,t,n){var r,a=!1;function i(){a||(a=!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)?((r={props:n.props}).revenue=n.revenue,plausible(n.name,r)):((r={props:n.props,callback:i}).revenue=n.revenue,plausible(n.name,r),setTimeout(i,5e3),e.preventDefault())}p.addEventListener("click",i),p.addEventListener("auxclick",i);var u=["pdf","xlsx","docx","txt","rtf","csv","exe","key","pps","ppt","pptx","7z","pkg","rar","gz","zip","avi","mov","mp4","mpeg","wmv","midi","mp3","wav","wma","dmg"],g=l.getAttribute("file-types"),b=l.getAttribute("add-file-types"),w=g&&g.split(",")||b&&b.split(",").concat(u)||u;function h(e){var e=x(e)?e:e&&e.parentNode,t={name:null,props:{},revenue:{}},n=e&&e.classList;if(n)for(var r=0;r<n.length;r++){var a,i,u=n.item(r),o=u.match(/plausible-event-(.+)(=|--)(.+)/),o=(o&&(a=o[1],i=o[3].replace(/\+/g," "),"name"==a.toLowerCase()?t.name=i:t.props[a]=i),u.match(/plausible-revenue-(.+)(=|--)(.+)/));o&&(a=o[1],i=o[3],t.revenue[a]=i)}return t}var y=3;function k(e){if("auxclick"!==e.type||e.button===d){for(var t,n,r,a,i=e.target,u=0;u<=y&&i;u++){if((r=i)&&r.tagName&&"form"===r.tagName.toLowerCase())return;v(i)&&(t=i),x(i)&&(n=i),i=i.parentNode}n&&(a=h(n),t?(a.props.url=t.href,m(e,t,a)):((e={}).props=a.props,e.revenue=a.revenue,plausible(a.name,e)))}}function x(e){var t=e&&e.classList;if(t)for(var n=0;n<t.length;n++)if(t.item(n).match(/plausible-event-name(=|--)(.+)/))return!0;return!1}p.addEventListener("submit",function(e){var t,n=e.target,r=h(n);function a(){t||(t=!0,n.submit())}r.name&&(e.preventDefault(),t=!1,setTimeout(a,5e3),(e={props:r.props,callback:a}).revenue=r.revenue,plausible(r.name,e))}),p.addEventListener("click",k),p.addEventListener("auxclick",k)}();

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.