-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.json
70 lines (57 loc) · 2.55 KB
/
script.json
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// ==UserScript==
// @name StoreEVAData
// @namespace https://github.com/Tsuna77/tampermonkey-eva-snif/
// @version 2024-03-19-5
// @description try to take over the world!
// @author Tsuna and GrandMozeuR
// @match https://www.eva.gg/fr-FR/profile/public/*
// @downloadURL https://raw.githubusercontent.com/Tsuna77/tampermonkey-eva-snif/main/script.json
// @updateURL https://raw.githubusercontent.com/Tsuna77/tampermonkey-eva-snif/main/script.json
// @icon https://www.google.com/s2/favicons?sz=64&domain=efa.gg
// @grant none
// ==/UserScript==
(async function() {
'use strict';
// Your code here..
var sendData = function(data){
fetch("https://eva.tsuna.fr/"+data.displayName, {
method: "POST",
body: JSON.stringify(data),
headers: {
"Content-type": "application/json; charset=UTF-8"
}
});
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
let count = 0;
while (count < 4) {
console.log(`Attente de ${count} seconde(s)...`);
await sleep(1000); // Attendre pendant 1 seconde
count++;
}
var elementList = document.getElementsByClassName('StatisticCard-Value ff-gotham-medium text-uppercase lh-sm season-text');
var obj = {
nbGames : elementList.item(0).innerHTML,
nbVictories : elementList.item(1).innerHTML,
nbDefeat : elementList.item(2).innerHTML,
timePlayed : elementList.item(3).innerHTML,
nbKills : elementList.item(4).innerHTML,
nbDeath : elementList.item(5).innerHTML,
nbAssists : elementList.item(6).innerHTML,
maxDamage : elementList.item(7).innerHTML,
maxInARow : elementList.item(8).innerHTML,
maxDistance : elementList.item(9).innerHTML,
moyDistance : elementList.item(10).innerHTML
};
obj.kd = (Math.round((obj.nbKills/obj.nbDeath)*100)/100).toFixed(2)
var elementListDisplayName = document.getElementsByClassName('display-4 ff-gotham-medium lh-sm text-white');
obj.displayName = elementListDisplayName.item(0).children.item(0).innerHTML;
var elementListAccountName = document.getElementsByClassName('h5 ff-gotham-medium text-uppercase mb-0 text-light');
obj.accountName = elementListAccountName.item(0).innerHTML;
var elementListLvl = document.getElementsByClassName('season__experience h3 ff-gotham-medium text-uppercase mb-2');
obj.lvl = elementListLvl.item(0).innerHTML;
console.log(obj);
sendData(obj);
})();