-
Notifications
You must be signed in to change notification settings - Fork 0
/
Anti-Cheat-Links.js
523 lines (483 loc) · 22.5 KB
/
Anti-Cheat-Links.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
/**
* Friends Highlighter - Highlights your friends in the scoreboard and battlereports
*
* @author I-MrFixIt-I
* @version 1.3.2
* @url https://getbblog.com/
* Edited by Russao
* Added bf4db and bf4cheatreport for each player + advanced stats for battle report
*/
BBLog.handle("add.plugin", {
stdColor : "#00c8ff",
id : "mrfixit-friends-highlighter",
name : "Anti-Cheat Links & Advanced Stats",
translations : {
"en" : {
"use.adv-battlereport" : "Advanced Battlereport",
"use.adv-style" : "Style: Name 1st",
"use.adv-basic" : "Basic list + detailed stats",
"use.BFLinks" : "Show Anti-Cheat links",
"use.friends-highlighter" : "Use Friends Highlighter",
"change-color" : "Change color",
"choose-color" : "Choose a color of your choice. Example: #00c8ff"
},
"de" : {
"use.adv-battlereport" : "Advanced Battlereport",
"use.BFLinks" : "Show Anti-Cheat links",
"use.friends-highlighter" : "Friends Highlighter verwenden",
"change-color" : "Farbe ändern",
"choose-color" : "Wähle eine Farbe deiner Wahl. Beispiel: #00c8ff"
}
},
configFlags : [
{"key" : "use.adv-battlereport", "init" : 1},
{"key" : "use.adv-style", "init" : 1},
{"key" : "use.adv-basic", "init" : 0},
{"key" : "use.BFLinks", "init" : 1},
{"key" : "use.friends-highlighter", "init" : 1},
{"key" : "change-color", "init" : 0, "handler" : function(instance){
var color = prompt(instance.t("choose-color"));
if (!color) return;
if (color.charAt(0) != "#")
{
color =+ "#";
}
var isHexValue = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(color);
if (isHexValue)
{
instance.storage("color", color);
}
}}
],
friendsListcontainsUsername : function(soldierName){
var containsUsername = false;
var friendsList = comcenter.getFriendsListFromLs();
friendsList.forEach(function(friend) {
if (friend.username == soldierName)
{
containsUsername = true;
}
});
return containsUsername;
},
delaycount: 20,
highlightFriends : function(instance, rows, templa){
var teamchk = Surface.Renderer.state.surface.battlereport.battleReport;
var shownewdmg = false;
if (BBLog.BBWF) shownewdmg = true;
var datajax = {};
var showadvbr = "yes";
var usealstyle = 0;
var usebasicstats = 0;
var datstopb = "";
var sttots = [];
var team = [];
var twot = 0;
var delaycountb = {};
if (instance.storage("use.adv-style")) usealstyle = 1;
if (instance.storage("use.adv-basic")) usebasicstats = 1;
if (window.location.href.match(/\/servers\/show\/pc\//i)) showadvbr = "no";
if (instance.storage("use.adv-battlereport") && showadvbr == "yes") {
showadvbr = "yes";
} else {
showadvbr = "no";
}
if (showadvbr == "yes" && usebasicstats == 0) {
var gsquads = $("#battlereport-squads");
var gteams = $("#battlereport-teamstats");
var isactteam = $("#battlereport-scoreboard .active").first();
var sqdfill = $("#battlereport-squads .squadrow-fillup");
if (sqdfill) {
var sqdsp = sqdfill.find("td");
sqdsp.attr('colspan' , '9');
}
var doadvst = 2;
if (gteams) {
if (doadvst == 2) { // 1
var bluet = gteams.find(".tr-color-allied");
var redt = gteams.find(".tr-color-enemy");
var sbluet = gsquads.find(".tr-color-allied");
var sredt = gsquads.find(".tr-color-enemy");
var cifloaded = gteams.find("#infocheck").first();
datstopb = cifloaded.attr('data-load');
if (datstopb != "yes") {
var chntib = bluet.find(".last");
var chntir = redt.find(".last");
var schntib = sbluet.find(".last");
var schntir = sredt.find(".last");
var htmlcth = '<th class="center">KD</th><th class="center" data-tooltip="<b>KILL ASSISTS</b>">A</th><th class="center" data-tooltip="<b>REVIVES</b>">R</th><th class="center" data-tooltip="<b>HEALS</b>">H</th>';
chntib.before(htmlcth);
chntir.before(htmlcth);
schntib.before(htmlcth);
schntir.before(htmlcth);
var gteam = bluet.find("th").first();
if (gteam) {
team[1] = gteam.text();
team[2] = redt.find("th").first().text();
if (team[1].toUpperCase().indexOf("US") !== -1) twot = 1;
if (team[1].toUpperCase().indexOf("CN") !== -1) twot = 1;
if (team[1].toUpperCase().indexOf("RU") !== -1) twot = 1;
}
}
}
}
}
$.each($(rows), function() {
var loadft = 0;
var soldierNameContainer = $(this).find(".soldier-name .user-info .common-playername-personaname-nolink");
var soldierName = $(soldierNameContainer).text();
if (soldierName.length < 2) {
soldierNameContainer = $(this).find(".soldier-name .user-info .common-playername-personaname");
soldierName = $(soldierNameContainer).text();
soldierName = soldierName.replace(/\n/g, "");
soldierName = soldierName.replace(/ /g, "");
}
var tag = $(soldierNameContainer).find(".bblog-tag").text(); // get clan tag from player
var html = "";
if (tag.length > 0)
{
soldierName = soldierName.substr(tag.length); // get playername and cut the clantag from it
}
if (instance.storage("use.friends-highlighter")) {
if(instance.friendsListcontainsUsername(soldierName))
{
if (instance.storage("change-color"))
{
var color = instance.storage("color");
if (color !== null)
{
$(soldierNameContainer).css("color", color);
}
else
{
$(soldierNameContainer).css("color", instance.stdColor);
}
}
else
{
$(soldierNameContainer).css("color", instance.stdColor);
}
} else {
}
}
var newsname = soldierName.replace(" ", "_");
var didit = $("#bfdb_"+newsname).attr('name');
var datapid = $(this).attr("data-personaid");
$(document).ready(function() {
if (soldierName != didit) {
var bfdbcode = "";
var linkpos = "font-size: 11px; color: red; margin-left: -70px; top:-25px";
var setleft = "68px";
var iscomm = 0;
if ($("#battlereport-commander-scoreboard tr[data-personaid=\"" + datapid + "\"]").hasClass('commander')) iscomm = 1;
if (showadvbr == "yes") linkpos = "font-size: 7px; color: red; z-index: 1; left: "+setleft+"; top: 14px; position: absolute;";
if (usealstyle == 1) linkpos = "font-size: 7px; color: red; z-index: 1; left: 65px; top: 28px; position: absolute;";
if (usebasicstats == 1 || templa == "server") linkpos = "font-size: 7px; color: red; z-index: 1; left: 75px; top: 34px; position: absolute;";
if (instance.storage("use.BFLinks") && showadvbr == "no" && usealstyle == 1) linkpos = "font-size: 7px; color: red; z-index: 1; left: 75px; top: 34px; position: absolute;";
if (instance.storage("use.BFLinks")) bfdbcode = ` <a style="font-size: 11px;color:red;" href='https://bf4db.com/player/` + datapid + `' target='_blank'>BF4DB</a> | <a style="font-size: 11px;color:#445C9C;" href='https://bf4cheatreport.com?bblog=1&cnt=100&pid=` + datapid + `' target='_blank'>BF4CR</a>`;
html = `<div id='bfdb_`+newsname+`' name='`+soldierName+`' value='yes' style='`+linkpos+`'>` + bfdbcode + `</div>`;
if (iscomm == 1) {
$("tr[data-personaid=\"" + datapid + "\"] div[class=user-info]").first().append(html);
} else {
$("tr[data-personaid=\"" + datapid + "\"] div[class=user-info]").append(html);
}
if (showadvbr == "yes") {
if (usebasicstats == 0) {
$("tr[data-personaid=\"" + datapid + "\"] td[class=soldier-name]").css({'padding': '6px'});
var brdatab = Surface.Renderer.state.surface.battlereport.battleReport;
var chkhsawardb = brdatab.allPersonalPrizes[datapid];
if (chkhsawardb) {
if (chkhsawardb[0] == "headshots") {
var codehsml = '<div style="position: absolute;right: 1px; top: 39px;" data-tooltip="Face Off ('+chkhsawardb[1]+' Headshots)"> ☠</div>';
$("tr[data-personaid=\"" + datapid + "\"] div[class=user-info]").append(codehsml);
}
}
if (usealstyle == 1) {
var esr = $("tr[data-personaid=\"" + datapid + "\"] div[class=user-personarank]");
var es = $("tr[data-personaid=\"" + datapid + "\"] div[class=user-info]");
var eb = $("tr[data-personaid=\"" + datapid + "\"] td[class=soldier-name]");
if (iscomm == 1) {
esr = $("tr[data-personaid=\"" + datapid + "\"] div[class=user-personarank]").first();
es = $("tr[data-personaid=\"" + datapid + "\"] div[class=user-info]").first();
eb = $("tr[data-personaid=\"" + datapid + "\"] td[class=soldier-name]").first();
}
esr.css({'margin-top': '24px'});
es.css({'position': 'absolute'});
var aeb = eb.find(".avatar");
eb.append('<div style="width: 134px;"></div>');
aeb.css({'margin-top': '25px'});
}
}
$("tr[data-personaid=\"" + datapid + "\"]").on("click", function () {
var chkload = $("#movhere-"+datapid);
if (chkload){
if (chkload[0]) {
var getextra = $("#advsta-"+datapid);
if (getextra) getextra.css({'display': 'none'});
return;
}
}
var isactteamb = $("#battlereport-scoreboard .active").first();
var teamrow = isactteamb.attr("data-contentid");
var cspcol = $("#battlereport-player-score-"+teamrow+"-"+ datapid);
var rpcsp = cspcol.find("td").first();
rpcsp.attr('colspan' , '9');
$(document).ajaxStop(function(){
rpcsp = cspcol.find("td").first();
rpcsp.attr('colspan' , '9');
});
if (delaycountb[datapid]) {
if (delaycountb[datapid].id == datapid) loadft = 1;
}
if (loadft == 0) {
delaycountb[datapid] = { "id": datapid, "stats":0 };
} else {
rpcsp = cspcol.find("td").first();
rpcsp.attr('colspan' , '9');
if (delaycountb[datapid]) {
if (delaycountb[datapid].stats) {
instance.doavgstats(datapid, delaycountb[datapid].stats, "cached", teamrow, shownewdmg, usebasicstats);
}
}
}
});
$( document ).ajaxComplete(function( event, xhr, settings ) {
var chkurl = settings.url;
if(chkurl.indexOf(datapid) != -1) {
var okgo = false;
if (xhr) {
if (xhr.statusText == "OK") okgo = true;
}
if (okgo) {
datajax = JSON.parse(xhr.responseText);
if (delaycountb[datapid]) {
var isactteamc = $("#battlereport-scoreboard .active").first();
var teamrowc = isactteamc.attr("data-contentid");
delaycountb[datapid].stats = datajax;
instance.doavgstats(datapid, datajax, "live", teamrowc, shownewdmg, usebasicstats);
}
}
}
});
if (doadvst == 2 && usebasicstats == 0) {
var advst = Surface.Renderer.state.surface.battlereport.battleReport.players[datapid];
if (advst) {
var testt = $("tr[data-personaid=\"" + datapid + "\"]");
if (sttots[datapid] == advst["personaId"]) return;
sttots[datapid] = advst["personaId"];
var teamid = advst["team"];
if (sttots[teamid]) {
sttots[teamid] = [sttots[teamid][0] + advst["kills"], sttots[teamid][1] + advst["deaths"], sttots[teamid][2] + advst["killAssists"], sttots[teamid][3] + advst["revives"], sttots[teamid][4] + advst["heals"], sttots[teamid][5] + advst["combatScore"]];
} else {
sttots[teamid] = [advst["kills"], advst["deaths"], advst["killAssists"], advst["revives"], advst["heals"], advst["combatScore"]];
}
var test = [advst["kills"], advst["deaths"], advst["killAssists"], advst["revives"], advst["heals"], advst["combatScore"]];
var pkd = advst["deaths"] == 0 ? advst["kills"]: (advst["kills"]/advst["deaths"]).toFixed(2).replace(/(\.0*|(?<=(\..*))0*)$/, '') || 0;
var infhtml = '<td class="center">' + pkd + '</td><td class="center" data-tooltip="<b>KILL ASSISTS</b>">' + advst["killAssists"] + '</td><td class="center" data-tooltip="<b>REVIVES</b>">' + advst["revives"] + '</td><td class="center" data-tooltip="<b>HEALS</b>">' + advst["heals"] +'</td>';
var testtb = testt.find(".last");
if (iscomm == 1) {
testtb.first().before(infhtml);
} else {
testtb.before(infhtml);
}
}
}
}
}
});
});
// scoreboardfoot
$(document).ready(function() {
if (showadvbr == "yes") {
if (gteams) {
if (datstopb != "yes") {
var sgettotf = $("#battlereport-squads tfoot");
var tgettotf = $("#battlereport-teamstats tfoot");
gteams.prepend('<div id="infocheck" data-load="yes">');
if (tgettotf) {
var adcodtd = '<td></td><td></td><td></td><td></td>';
var bluetf = $("#battlereport-teamstats tfoot").eq(0);
var redtf = $("#battlereport-teamstats tfoot").eq(1);
var chkta = bluetf.find("td").eq(1);
var chktb = bluetf.find("td").eq(3);
if (chkta && chktb && twot == 1) {
var valfta = +chkta.text();
var valftb = +chktb.text().replace(",", "");
if (sttots[1]) {
var tkda = sttots[2][1] == 0 ? sttots[2][0]: (sttots[2][0]/sttots[2][1]).toFixed(2) || 0;
var tkdb = sttots[1][1] == 0 ? sttots[1][0]: (sttots[1][0]/sttots[1][1]).toFixed(2) || 0;
var aska = sttots[2][2];
var asha = sttots[2][3];
var asre = sttots[2][4];
var bska = sttots[1][2];
var bsha = sttots[1][3];
var bsre = sttots[1][4];
if (aska > 99) aska = `<span data-tooltip="`+aska+` Kill Assists">` + aska.toString()[0] + `..</span>`;
if (asha > 99) asha = `<span data-tooltip="`+asha+` Revives">` + asha.toString()[0] + `..</span>`;
if (asre > 99) asre = `<span data-tooltip="`+asre+` Heals">` + asre.toString()[0] + `..</span>`;
if (bska > 99) bska = `<span data-tooltip="`+bska+` Kill Assists">` + bska.toString()[0] + `..</span>`;
if (bsha > 99) bsha = `<span data-tooltip="`+bsha+` Revives">` + bsha.toString()[0] + `..</span>`;
if (bsre > 99) bsre =`<span data-tooltip="`+bsre+` Heals">` + bsre.toString()[0] + `..</span>`;
var totalsta = '<td>'+tkda+'</td><td>'+aska+'</td><td>'+asha+'</td><td>'+asre+'</td>';
var totalstb = '<td>'+tkdb+'</td><td>'+bska+'</td><td>'+bsha+'</td><td>'+bsre+'</td>';
if (valfta == sttots[1][0] && valftb == sttots[1][5]) {
totalsta = '<td>'+tkdb+'</td><td>'+bska+'</td><td>'+bsha+'</td><td>'+bsre+'</td>';
totalstb = '<td>'+tkda+'</td><td>'+aska+'</td><td>'+asha+'</td><td>'+asre+'</td>';
}
}
bluetf.find(".right").before(totalsta);
redtf.find(".right").before(totalstb);
} else {
tgettotf.find(".right").before(adcodtd);
}
}
if (sgettotf) {
var adcodtd = '<td></td><td></td><td></td><td></td>';
sgettotf.find(".right").before(adcodtd);
}
}
}
}
});
},
doavgstats: function (plyid, plydata, rstatus, teamrow, shownewdmg, usebasicstats) {
var cspcol = $("#battlereport-player-score-"+teamrow+"-"+ plyid);
var chkactv = $("tr[data-personaid=\"" + plyid + "\"]");
var imgsvg = cspcol.find(".player-score-pie").first();
var advhtml = "";
if (plydata.stats) {
var spancode = "<span style='color:#E38204;font-weight:bold'>";
var brdata = Surface.Renderer.state.surface.battlereport.battleReport;
var phits = plydata.stats.shots_hit || 0;
var pfired = plydata.stats.shots_fired || 0;
var pkills = plydata.stats.kills;
var pdeaths = plydata.stats.deaths;
var pdmg = pdeaths == 0 ? pkills: parseFloat(((pkills*100)/phits).toFixed(2)) || 0;
var chkhsaward = brdata.allPersonalPrizes[plyid];
var bwpn = plydata.best.weapon;
var bvhc = plydata.best.vehicle;
var wpnmi = cspcol.find(".player-stats li");
var dmginfo = "";
var headshots = 0;
var dmgstyle = "";
if (chkhsaward) {
if (chkhsaward[0] == "headshots") headshots = chkhsaward[1];
}
var pchs = 0;
var jsObjects = plydata.unlocks.awards;
var spotr = 0;
if (headshots > 0) {
pchs = ((headshots * 100) / pkills).toFixed(0);
} else {
if (plydata.unlocks) {
var awhs = jsObjects.find(function(el){
return el.nameSID === 'WARSAW_ID_P_AWARD_R04_NAME';
});
if (awhs) {
if (awhs.timesTaken) headshots = awhs.timesTaken*3;
if (headshots > 0) pchs = ((headshots * 100) / pkills).toFixed(0);
}
}
}
if (plydata.unlocks) {
var awspot = jsObjects.find(function(el){
return el.nameSID === 'WARSAW_ID_P_AWARD_R07_NAME';
});
if (awspot) {
if (awspot.timesTaken) spotr = awspot.timesTaken*4;
}
}
if (bwpn) {
if (bwpn.kills > 0) {
var pcowk = ((bwpn.kills * 100) / pkills).toFixed(1);
var wpnftip = "";
if (shownewdmg) {
if (BBLog.BBWF[bwpn.slug]) {
var wpndata = BBLog.BBWF[bwpn.slug];
if (bwpn.slug == "sr338") wpndata.hsmultiple = 2;
if (bwpn.slug == "usas-12-flir"|| bwpn.slug == "usas-12") { wpndata.dmgMax += wpndata.dmgSplash; wpndata.dmgMin += wpndata.dmgSplash; }
var mxdmg = wpndata.dmgMax*wpndata.ShotsPerShell;
var midmg = wpndata.dmgMin*wpndata.ShotsPerShell;
var tmtkall = BBLog.newcaclttk(100, mxdmg, wpndata.dmgFallStart, wpndata);
var aspchs = 0;
if (pchs > 0) aspchs = pchs/100;
var tmtkinf = "";
if (tmtkall[0] != tmtkall[1]) tmtkinf = `<br> (old symthic: `+tmtkall[1]+`ms)`;
wpnftip += `<hr>Info:<br>`+spancode+`Max dmg:</span> `+mxdmg.toFixed(0)+`<br>
`+spancode+`Min dmg:</span> `+midmg.toFixed(0)+`<br>
`+spancode+`Time to kill:</span> `+tmtkall[0]+`ms ` + tmtkinf;
dmginfo = ``;
if (pcowk >= 70 && bwpn.kills > 9) {
var maxposdmg = +(((mxdmg*aspchs)*wpndata.hsmultiple) + (mxdmg * (1-aspchs))).toFixed(2);
var kphhcbase = +parseFloat(((mxdmg)*60)/100).toFixed(2);
var hcdamage = +parseFloat((kphhcbase) + (mxdmg)).toFixed(2);
var tesmaxb = +(((hcdamage*aspchs)*wpndata.hsmultiple) + (hcdamage *(1-aspchs))).toFixed(2);
var tesmax = hcdamage;
if (pdmg > maxposdmg) dmgstyle = " color: #ef9e2b;";
if (pdmg >= tesmax && pdmg > maxposdmg) dmgstyle = " color: #ed8578;";
if (pdmg >= tesmaxb) dmgstyle = " color: #e2361f;";
}
}
}
if (wpnmi) {
var wpn_name = wpnmi.eq(2).find("span").last().text();
if (!wpn_name) wpn_name = bwpn.slug;
var wkills = "";
if (bwpn.kills > 1) wkills = "s";
var bwtext = `<h6>` + wpn_name + `</h6>
`+bwpn.kills+` kill`+wkills+` (`+pcowk+`% of the total kills)
`;
wpnftip = bwtext + wpnftip;
wpnmi.eq(2).prepend('<div style="float: right; position: relative;right: 15px;" data-tooltip="'+wpnftip+'"><span class="label" style="float: inline-end; margin-left: 2px; font-size: 13px;">('+bwpn.kills+' - '+pcowk+'%)</span></div>');
}
}
}
if (bvhc) {
if (bvhc.kills > 0) {
var pcovk = ((bvhc.kills * 100) / pkills).toFixed(1);
if (wpnmi) {
var bvh_name = wpnmi.eq(3).find("span").last().text();
if (!bvh_name) bvh_name = bvhc.slug;
var vkills = "";
if (bvhc.kills > 1) vkills = "s";
var bvtext = `<h6>` + bvh_name + `</h6>
`+bvhc.kills+` kill`+vkills+` (`+pcovk+`% of the total kills)
`;
if (wpnmi) wpnmi.eq(3).prepend('<div style="float: right; position: relative;right: 15px;" data-tooltip="'+bvtext+'"><span class="label" style="float: inline-end; margin-left: 2px; font-size: 13px;">('+bvhc.kills+' - '+pcovk+'%)</span></div>');
}
}
}
var stmiss = pfired - phits;
if (stmiss < 0) stmiss = 0;
dmginfo = `Percentage of kills per shot hit--100*kills/shotsHit.<br>`+spancode+`Fired:</span> ` +pfired+ `<br>`+spancode+`Hits:</span> ` + phits+ `<br>`+spancode+`Missed:</span> ` + stmiss;
advhtml = `<div id="advsta-`+plyid+`"><div style="position: absolute; top: 24px; width: 29%;"><ul class="player-stats" style="width: 100%; height: 20px;"><li><span class="label" style="margin-left: 2px; font-size: 12px;" data-tooltip="`+dmginfo+`">Damage</span><span class="center" style="float: right;`+dmgstyle+`" data-tooltip="`+dmginfo+`">`+pdmg+`</span></li></ul></div>
<div style="position: absolute; top: 50px; width: 29%;"><ul class="player-stats" style="width: 100%; height: 20px;"><li><span class="label" style="margin-left: 2px; font-size: 12px;">Headshots</span><span class="center" style="float: right;">`+headshots+` (`+pchs+`%)</span></li></ul></div>
<div style="position: absolute; top: 130px; width: 29%;"><ul class="player-stats" style="width: 100%; height: 20px;"><li><span class="label" style="margin-left: 2px; font-size: 12px;">Spots</span><span class="center" style="float: right;">`+spotr+`</span></li></ul></div>
</div>`;
}
var svgbaspos = ["12px", "20px"];
if (usebasicstats == 1) {
svgbaspos = ["15px", "-3px"];
imgsvg.find("svg").css({'transform': 'scale(0.6)'});
}
advhtml += `<div id="movhere-`+plyid+`" style="left: `+svgbaspos[1]+`;position: relative;height: 120px;top: `+svgbaspos[0]+`;"></div>`;
imgsvg.prepend(advhtml);
imgsvg.find("svg").appendTo("#movhere-"+plyid);
var cspcol = $("#battlereport-player-score-"+teamrow+"-"+ plyid);
if (cspcol) {
rpcsp = cspcol.find("td").first();
rpcsp.attr('colspan' , '9');
}
},
domchange : function(instance){
instance.delaycount = 20;
if(window.location.href.match(/\/servers\/show\/pc\//i)) {
if (BBLog._storage["bf4-advanced-scoreboard-plugin-dev-1-0.use.Advanced-Scoreboard"] != 1) {
instance.highlightFriends(instance, $("#server-players-list .row table tbody tr"), "server");
}
}
else if(window.location.href.match(/\/battlereport\/show\/1\//i)) {
instance.highlightFriends(instance, $("#battlereport-scoreboard .row table tbody tr"), "breport");
}
}
});