-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
insta_anonymousStoryViewer.js
53 lines (49 loc) · 1.55 KB
/
insta_anonymousStoryViewer.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
53
export default {
icon: '<i class="fa-solid fa-eye-slash fa-lg"></i>',
name: {
en: "Insta - Anonymous story viewer",
vi: "Insta - Xem story ẩn danh",
},
description: {
en: "Watch instagram stories anonymously",
vi: "Xem story instagram không bị đối phương phát hiện",
},
infoLink:
"https://greasyfork.org/en/scripts/468385-instagram-anonymous-story-viewer",
changeLogs: {
1.66: {
"2024-04-15": "init",
},
},
whiteList: ["*://www.instagram.com/*"],
onDocumentStart: () => {
(function () {
// Store a reference to the original send method of XMLHttpRequest
var originalXMLSend = XMLHttpRequest.prototype.send;
// Override the send method
XMLHttpRequest.prototype.send = function () {
// Check if the request URL contains the "viewSeenAt" string
if (
typeof arguments[0] === "string" &&
arguments[0].includes("viewSeenAt")
) {
UfsGlobal.DOM.notify({
msg: "Usefull-script: Blocked story view tracking",
});
console.log("blocked");
// Block the request by doing nothing
// This prevents the "viewSeenAt" field from being sent
} else {
// If the request URL does not contain "viewSeenAt",
// call the original send method to proceed with the request
originalXMLSend.apply(this, arguments);
}
};
})();
},
onDocumentEnd: () => {
UfsGlobal.DOM.notify({
msg: "Usefull-script: Blocked story view tracking READY",
});
},
};