PageSourceSearch

https://www.lolbounce.com/cp/resources/js/click_mapping.js?v=1557513038

js lolbounce.com collected 2026-10-08 03:28:07 UTC 3,639 bytes, 198 lines download raw bytes

1var CM_click_count = 0;
2var CM_click_limit = 3;
3var CM_registered_xy = null;
4var CM_ic = [];
5var CM_plts = Date.now();
6
7function CM_scroll_top()
8{
9	var scroll_top = 0;
10
11	var bst = document.body.scrollTop;
12	if (bst != 0)
13	{
14		scroll_top = bst;
15	}
16
17	var dest = document.documentElement.scrollTop;
18	if (dest != 0)
19	{
20		scroll_top = dest;
21	}
22
23	return scroll_top;
24}
25
26var CM_send_info = function()
27{
28	if (!CM_foldername)
29	{
30		return;
31	}
32
33	if (CM_click_count >= CM_click_limit)
34	{
35		return;
36	}
37
38	var cmxy = ersVA(CM_registered_xy);
39	if (cmxy.length < 2)
40	{
41		CM_registered_xy = null;
42		return;
43	}
44
45	var p = location.pathname;
46	switch (p)
47	{
48		case "/cp/":
49
50			return;
51
52		default:
53			break;
54	}
55
56	var plid = "";
57	if (typeof PL_row_id !== "undefined")
58	{
59		plid = PL_row_id;
60	}
61
62	var sk = "";
63	if (typeof SI_designator !== "undefined")
64	{
65		sk = SI_designator;
66	}
67
68	var vps = getViewPortSize();
69
70	var x = cmxy[0];
71	var y = (cmxy[1] + CM_scroll_top());
72	var w = vps[0];
73	var r = Math.floor((Math.random() * 10000) + 1);
74	
75	var CMi = new Image;
76	CMi.src = `//${window.appConfig.filesHost}/browsertools/mouser/m.gif?fn=` + CM_foldername + "&p=" + p + "&plid=" + plid + "&sk=" + sk + "&x=" + x + "&y=" + y + "&w=" + w + "&r=" + r + "&d=" + (Date.now() - CM_plts);
77	CMi.onload = function(){ CM_img_loaded = true; };
78	CM_ic = [ CMi ];
79
80	fake_sleep(150);
81
82	CM_click_count++;
83
84	if (CM_click_count >= CM_click_limit)
85	{
86		CM_tear_down();
87	}
88}
89
90var CM_touch_start = function(e)
91{
92	CM_registered_xy = [ e.touches[0].clientX, e.touches[0].clientY ];
93}
94
95var CM_touch_end = function()
96{
97	if (CM_registered_xy != null)
98	{
99		CM_send_info();
100	}
101}
102
103var CM_scroll = function()
104{
105	CM_registered_xy = null;
106}
107
108var CM_click = function(e)
109{
110	CM_registered_xy = [ e.clientX, e.clientY ];
111
112	CM_send_info();
113}
114
115var CM_load_ts = ersCurrentUnixTimestamp();
116var CM_last_scroll_or_move_recorded_ts = (CM_load_ts + 10);
117
118var CM_scroll_or_move = function()
119{
120	var ts = ersCurrentUnixTimestamp();
121	if ((ts - CM_last_scroll_or_move_recorded_ts) < 30)
122	{
123		return;
124	}
125
126	CM_last_scroll_or_move_recorded_ts = ts;
127
128	CMValidatePageLoad(3);
129}
130
131function CM_setup()
132{
133	if (!CM_foldername)
134	{
135		return;
136	}
137
138	window.addEventListener("beforeunload", function(e){ CMValidatePageLoad(3); });
139	window.addEventListener("scroll", CM_scroll_or_move);
140
141	if (CM_use_touch)
142	{
143		window.addEventListener("touchstart", CM_touch_start);
144		window.addEventListener("touchend", CM_touch_end);
145		window.addEventListener("scroll", CM_scroll);
146		return;
147	}
148
149	window.addEventListener("mousedown", CM_click, true);
150	window.addEventListener("mousemove", CM_scroll_or_move, true);
151}
152
153function CM_tear_down()
154{
155	if (CM_use_touch)
156	{
157		window.removeEventListener("touchstart", CM_touch_start);
158		window.removeEventListener("touchend", CM_touch_end);
159		window.removeEventListener("scroll", CM_scroll);
160	}
161
162	window.removeEventListener("mousedown", CM_click);
163}
164
165CM_setup();
166
167ersScheduleAction(function(){ CMValidatePageLoad(1); }, 1000);
168ersScheduleAction(function(){ CMValidatePageLoad(2); }, 5000);
169
170function CMValidatePageLoad(step)
171{
172	if ((ersCurrentUnixTimestamp() - CM_load_ts) > (60 * 30))
173	{
174		return;
175	}
176
177	var plid = "";
178	if (typeof PL_row_id !== "undefined")
179	{
180		plid = PL_row_id;
181	}
182
183	var sk = "";
184	if (typeof SI_designator !== "undefined")
185	{
186		sk = SI_designator;
187	}
188
189	var r = Math.floor((Math.random() * 10000) + 1);
190
191	if (plid.length > 0)
192	{
193		var VPLi = new Image;
194		VPLi.src = `//${window.appConfig.filesHost}/browsertools/plvalidate/plv.gif?fn=` + CM_foldername + "&plid=" + plid + "&sk=" + sk + "&s=" + step + "&r=" + r;
195		VPLi.onload = function(){ VPL_img_loaded = true; };
196		VPL_ic = [ VPLi ];
197	}
198}

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.