PageSourceSearch

https://moznainaczej.com/plugins/system/antispambycleantalk/js/ct-functions.js?1791293561

js moznainaczej.com collected 2026-10-06 13:32:54 UTC 2,479 bytes, 74 lines download raw bytes

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

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.