PageSourceSearch

https://www.prarulebook.co.uk/scripts/telemetry.js?ver=9c1d9

js prarulebook.co.uk collected 2026-10-02 02:18:51 UTC 2,301 bytes, 66 lines download raw bytes

1var AiTelemetry = AiTelemetry || {};
2AiTelemetry.TelemetryInitializers = AiTelemetry.TelemetryInitializers || {
3	/*
4	 * This telemetry filter blocks warnings about 3rd party scripts that we can't get details about due to same-origin policy.
5	 * https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#javascript-telemetry-initializers
6	 * https://github.com/microsoft/ApplicationInsights-JS/issues/1383
7	 */
8	UnreportableThirdPartyExceptionFilter: function (envelope) {
9		try {
10			if (envelope && envelope.baseType && envelope.baseType === 'ExceptionData') {
11
12				if (typeof (envelope.baseData.exceptions) === 'undefined' &&
13					envelope.baseData.message &&
14					envelope.baseData.message.indexOf('same-origin policy prevents us from getting the details of this exception') >= 0) {
15					return false;
16				}
17			}
18		} catch (err) {
19			console.log(err);
20		}
21	},
22	/*
23	 * This filter will block successful remote dependency requests that are not very slow from being logged.
24	 */
25	SuccessfulDependencyFilter: function (envelope) {
26		if (envelope.baseType === 'RemoteDependencyData') {
27			if (envelope.baseData.success && envelope.baseData.duration < 3000) {
28				return false;
29			}
30		}
31	},
32	/*
33	 * This filter introduces custom sampling. You'll need to call this factory function to generate your filter
34	 */
35	CustomSamplingFilterFactory: function (aiSamplePercentage) {
36		return function (envelope) {
37			if (envelope.baseType === 'EventData' || envelope.baseType === 'MetricData') {
38				return true; // No fixed rate filter on Event or Metric Data
39			}
40			if (!window.customSampleValue) {
41				window.customSampleValue = Math.random() * 100;
42
43			}
44			var includedSample = (window.customSampleValue < aiSamplePercentage);
45			envelope.data.CustomSamplingRate = aiSamplePercentage;
46			return includedSample;
47		};
48	},
49
50	GetConsentCookie : function getCookie(cname) {
51		var name = cname + "=";
52		var decodedCookie = decodeURIComponent(document.cookie);
53		var ca = decodedCookie.split(';');
54		for (var i = 0; i < ca.length; i++) {
55			var c = ca[i];
56			while (c.charAt(0) === ' ') {
57				c = c.substring(1);
58			}
59			if (c.indexOf(name) === 0) {
60				return c.substring(name.length, c.length);
61			}
62		}
63		return "";
64	}
65};
66

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.