PageSourceSearch

https://abilitynet.org.uk/sites/abilitynet.org.uk/modules/contrib/cleantalk/src/js/apbct-public.js?tm246h

js abilitynet.org.uk collected 2026-10-01 07:35:13 UTC 2,502 bytes, 75 lines download raw bytes

1var d = new Date(), 
2	ctTimeMs = new Date().getTime(),
3	ctMouseEventTimerFlag = true, //Reading interval flag
4	ctMouseData = "[",
5	ctMouseDataCounter = 0;
6
7function ctSetCookie(c_name, value) {
8	document.cookie = c_name + "=" + encodeURIComponent(value) + "; path=/";
9}
10
11ctSetCookie("ct_ps_timestamp", Math.floor(new Date().getTime()/1000));
12ctSetCookie("ct_fkp_timestamp", "0");
13ctSetCookie("ct_pointer_data", "0");
14ctSetCookie("ct_timezone", d.getTimezoneOffset()/60*(-1));
15
16//Reading interval
17var ctMouseReadInterval = setInterval(function(){
18		ctMouseEventTimerFlag = true;
19	}, 150);
20	
21//Writting interval
22var ctMouseWriteDataInterval = setInterval(function(){
23		var ctMouseDataToSend = ctMouseData.slice(0,-1).concat("]");
24		ctSetCookie("ct_pointer_data", ctMouseDataToSend);
25	}, 1200);
26
27//Stop observing function
28function ctMouseStopData(){
29	if(typeof window.addEventListener == "function")
30		window.removeEventListener("mousemove", ctFunctionMouseMove);
31	else
32		window.detachEvent("onmousemove", ctFunctionMouseMove);
33	clearInterval(ctMouseReadInterval);
34	clearInterval(ctMouseWriteDataInterval);				
35}
36
37//Logging mouse position each 300 ms
38var ctFunctionMouseMove = function output(event){
39	if(ctMouseEventTimerFlag == true){
40		var mouseDate = new Date();
41		ctMouseData += "[" + Math.round(event.pageY) + "," + Math.round(event.pageX) + "," + Math.round(mouseDate.getTime() - ctTimeMs) + "],";
42		ctMouseDataCounter++;
43		ctMouseEventTimerFlag = false;
44		if(ctMouseDataCounter >= 100)
45			ctMouseStopData();
46	}
47};
48
49//Stop key listening function
50function ctKeyStopStopListening(){
51	if(typeof window.addEventListener == "function"){
52		window.removeEventListener("mousedown", ctFunctionFirstKey);
53		window.removeEventListener("keydown", ctFunctionFirstKey);
54	}else{
55		window.detachEvent("mousedown", ctFunctionFirstKey);
56		window.detachEvent("keydown", ctFunctionFirstKey);
57	}
58}
59
60//Writing first key press timestamp
61var ctFunctionFirstKey = function output(event){
62	var KeyTimestamp = Math.floor(new Date().getTime()/1000);
63	ctSetCookie("ct_fkp_timestamp", KeyTimestamp);
64	ctKeyStopStopListening();
65};
66
67if(typeof window.addEventListener == "function"){
68	window.addEventListener("mousemove", ctFunctionMouseMove);
69	window.addEventListener("mousedown", ctFunctionFirstKey);
70	window.addEventListener("keydown", ctFunctionFirstKey);
71}else{
72	window.attachEvent("onmousemove", ctFunctionMouseMove);
73	window.attachEvent("mousedown", ctFunctionFirstKey);
74	window.attachEvent("keydown", ctFunctionFirstKey);
75}

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.