-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.js
37 lines (37 loc) · 1.48 KB
/
content.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
console.log("vtop15+ extension active");
const initialTime = Date.now();
const menuToggle = document.querySelector("#menu-toggle");
if (menuToggle !== null) {
const doSomething = () => {
var winImage = document.querySelector("#winImage")?.value;
var authorizedID = document.querySelector("#authorizedID")?.value;
fetch(
"https://vtop.vit.ac.in/vtop/studentsRecord/StudentProfileAllView",
{
headers: {
accept: "*/*",
"accept-language": "en-US,en;q=0.9",
"content-type":
"application/x-www-form-urlencoded; charset=UTF-8",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"sec-gpc": "1",
"x-requested-with": "XMLHttpRequest",
},
referrer: "https://vtop.vit.ac.in/vtop/initialProcess",
referrerPolicy: "strict-origin-when-cross-origin",
body: `verifyMenu=true&winImage=${winImage}&authorizedID=${authorizedID}&nocache=@(new Date().getTime())`,
method: "POST",
mode: "cors",
credentials: "include",
}
).then((res) =>
console.log((Date.now() - initialTime) / 1000, res.status, res)
);
};
doSomething();
setInterval(() => {
doSomething();
}, 2 * 60 * 1000);
}