-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunprotected.js
52 lines (52 loc) · 1.53 KB
/
unprotected.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(function () {
"use strict";
{
class e extends Error {
constructor(t, o) {
super(), (this.code = t), (this.message = o);
}
}
(e.PERMISSION_DENIED = 1), (e.POSITION_UNAVAILABLE = 2), (e.TIMEOUT = 3);
let a = 0;
const i = { geos: [] },
r = document.documentElement;
r.addEventListener("responseLocationSpoofingAutoSwiper", (n) => {
const t = n.detail;
for (const [o, s] of i.geos)
try {
t.latitude && t.longitude
? o({
timestamp: Date.now(),
coords: {
latitude: t.latitude,
longitude: t.longitude,
altitude: null,
accuracy: 64.0999,
altitudeAccuracy: null,
heading: parseInt("NaN", 10),
velocity: null,
},
})
: s(new e(e.POSITION_UNAVAILABLE, "Position unavailable"));
} catch {}
i.geos.length = 0;
}),
(navigator.geolocation.getCurrentPosition = new Proxy(
navigator.geolocation.getCurrentPosition,
{
apply(n, t, o) {
i.geos.push(o),
r.dispatchEvent(new Event("requestLocationSpoofingAutoSwiper"));
},
}
)),
(navigator.geolocation.watchPosition = new Proxy(
navigator.geolocation.watchPosition,
{
apply(n, t, o) {
return navigator.geolocation.getCurrentPosition(...o), (a += 1), a;
},
}
));
}
})();