/ Enter your leaderboard name
let lname = "RAFTRADER";
// Enter your initial capital
let iblafp = 10000;
// Change live accout to demo by text and active
document.getElementsByClassName("usermenu__info-name")[0].innerHTML = "LIVE";
// function for dynamic all thing
setInterval(function () {
// Find Tha balance
let blc = document.getElementsByClassName("usermenu__info-balance")[0]
.innerHTML;
blc = blc.replaceAll(",", "");
blc = blc.replaceAll("$", "");
blc = blc.replaceAll(".", "");
blc = blc.substring(0, blc.length - 2);
blc = parseInt(blc);
// set profile icoin
let icoin;
if (blc < 1000) {
icoin =
'';
} else if (blc >= 1000 && blc < 5000) {
icoin =
'';
} else if (blc >= 5000) {
icoin =
'';
}
// place profile icoin
document.getElementsByClassName("usermenu__info-levels")[0].innerHTML = icoin;
}, 1000);
//leader board setting
setInterval(function () {
//leader board green bar
var leaderboard = document.getElementsByClassName("app--sidepanel-open")[0];
if (leaderboard != null) {
document.getElementsByClassName("position__loading")[0].style.background =
"#0faf59";
// set leaderboard balnce
let lblc = document.getElementsByClassName("usermenu__info-balance")[0]
.innerHTML;
lblc = lblc.replaceAll(",", "");
lblc = lblc.replaceAll("$", "");
lblc = lblc.replaceAll(".", "");
lblc = parseInt(lblc);
lprofit = lblc - iblafp;
lprofit = lprofit.toString();
if (lprofit == 0) {
let s1 = lprofit.slice(0, 1);
let s2 = lprofit.slice(1, 3);
lprofit = "$0.00";
} else if (lprofit.length == 3) {
let s1 = lprofit.slice(0, 1);
let s2 = lprofit.slice(1, 3);
lprofit = "$" + s1 + "." + s2;
} else if (lprofit.length == 4) {
let s1 = lprofit.slice(0, 2);
let s2 = lprofit.slice(2, 4);
lprofit = "$" + s1 + "." + s2;
} else if (lprofit.length == 5) {
let s1 = lprofit.slice(0, 3);
let s2 = lprofit.slice(3, 5);
lprofit = "$" + s1 + "." + s2;
} else if (lprofit.length == 6) {
let s1 = lprofit.slice(0, 1); //0,1
let s2 = lprofit.slice(1, 4); //1,3
let s3 = lprofit.slice(4, 6); //4,6
lprofit = "$" + s1 + "," + s2 + "." + s3;
} else if (lprofit.length == 7) {
let s1 = lprofit.slice(0, 2); //0,1
let s2 = lprofit.slice(2, 5); //1,3
let s3 = lprofit.slice(5, 7); //4,6
lprofit = "$" + s1 + "," + s2 + "." + s3;
}
document.getElementsByClassName(
"position__header-money --green"
)[0].innerHTML = lprofit;
// All top 20 profit value
let p1 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[0].innerHTML;
p1 = p1.replaceAll(",", "");
p1 = p1.replaceAll("$", "");
p1 = p1.replaceAll(".", "");
p1 = parseInt(p1);
let p2 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[1].innerHTML;
p2 = p2.replaceAll(",", "");
p2 = p2.replaceAll("$", "");
p2 = p2.replaceAll(".", "");
p2 = parseInt(p2);
let p3 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[2].innerHTML;
p3 = p3.replaceAll(",", "");
p3 = p3.replaceAll("$", "");
p3 = p3.replaceAll(".", "");
p3 = parseInt(p3);
let p4 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[3].innerHTML;
p4 = p4.replaceAll(",", "");
p4 = p4.replaceAll("$", "");
p4 = p4.replaceAll(".", "");
p4 = parseInt(p4);
let p5 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[4].innerHTML;
p5 = p5.replaceAll(",", "");
p5 = p5.replaceAll("$", "");
p5 = p5.replaceAll(".", "");
p5 = parseInt(p5);
let p6 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[5].innerHTML;
p6 = p6.replaceAll(",", "");
p6 = p6.replaceAll("$", "");
p6 = p6.replaceAll(".", "");
p6 = parseInt(p6);
let p7 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[6].innerHTML;
p7 = p7.replaceAll(",", "");
p7 = p7.replaceAll("$", "");
p7 = p7.replaceAll(".", "");
p7 = parseInt(p7);
let p8 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[7].innerHTML;
p8 = p8.replaceAll(",", "");
p8 = p8.replaceAll("$", "");
p8 = p8.replaceAll(".", "");
p8 = parseInt(p8);
let p9 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[8].innerHTML;
p9 = p9.replaceAll(",", "");
p9 = p9.replaceAll("$", "");
p9 = p9.replaceAll(".", "");
p9 = parseInt(p9);
let p10 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[9].innerHTML;
p10 = p10.replaceAll(",", "");
p10 = p10.replaceAll("$", "");
p10 = p10.replaceAll(".", "");
p10 = parseInt(p10);
let p11 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[10].innerHTML;
p11 = p11.replaceAll(",", "");
p11 = p11.replaceAll("$", "");
p11 = p11.replaceAll(".", "");
p11 = parseInt(p11);
let p12 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[11].innerHTML;
p12 = p12.replaceAll(",", "");
p12 = p12.replaceAll("$", "");
p12 = p12.replaceAll(".", "");
p12 = parseInt(p12);
let p13 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[12].innerHTML;
p13 = p13.replaceAll(",", "");
p13 = p13.replaceAll("$", "");
p13 = p13.replaceAll(".", "");
p13 = parseInt(p13);
let p14 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[13].innerHTML;
p14 = p14.replaceAll(",", "");
p14 = p14.replaceAll("$", "");
p14 = p14.replaceAll(".", "");
p14 = parseInt(p14);
let p15 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[14].innerHTML;
p15 = p15.replaceAll(",", "");
p15 = p15.replaceAll("$", "");
p15 = p15.replaceAll(".", "");
p15 = parseInt(p15);
let p16 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[15].innerHTML;
p16 = p16.replaceAll(",", "");
p16 = p16.replaceAll("$", "");
p16 = p16.replaceAll(".", "");
p16 = parseInt(p16);
let p17 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[16].innerHTML;
p17 = p17.replaceAll(",", "");
p17 = p17.replaceAll("$", "");
p17 = p17.replaceAll(".", "");
p17 = parseInt(p17);
let p18 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[17].innerHTML;
p18 = p18.replaceAll(",", "");
p18 = p18.replaceAll("$", "");
p18 = p18.replaceAll(".", "");
p18 = parseInt(p18);
let p19 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[18].innerHTML;
p19 = p19.replaceAll(",", "");
p19 = p19.replaceAll("$", "");
p19 = p19.replaceAll(".", "");
p19 = parseInt(p19);
let p20 = document.getElementsByClassName(
"panel-leader-board__item-money --green"
)[19].innerHTML;
p20 = p20.replaceAll(",", "");
p20 = p20.replaceAll("$", "");
p20 = p20.replaceAll(".", "");
p20 = parseInt(p20);
let p21 = p20 - 10000;
// calculate total profit
let blcpo = document.getElementsByClassName(
"position__header-money --green"
)[0].innerHTML;
blcpo = blcpo.replaceAll(",", "");
blcpo = blcpo.replaceAll("$", "");
blcpo = blcpo.replaceAll(".", "");
blcpo = parseInt(blcpo);
let po;
// Set posotion in leaderboard session amd also in top 20 list
if (blcpo < p21) {
let divi = Math.round(p21 / 30000);
po = Math.round((32500 - blcpo / divi) / 100);
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:' + po;
} else {
if (blcpo > p2) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:1';
document.getElementsByClassName(
"panel-leader-board__item"
)[0].innerHTML =
'1' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p2 && blcpo > p3) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:2';
document.getElementsByClassName(
"panel-leader-board__item"
)[1].innerHTML =
'2' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p3 && blcpo > p4) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:3';
document.getElementsByClassName(
"panel-leader-board__item"
)[2].innerHTML =
'3' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p4 && blcpo > p5) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:4';
document.getElementsByClassName(
"panel-leader-board__item"
)[3].innerHTML =
'4' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p5 && blcpo > p6) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:5';
document.getElementsByClassName(
"panel-leader-board__item"
)[4].innerHTML =
'5' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p6 && blcpo > p7) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:6';
document.getElementsByClassName(
"panel-leader-board__item"
)[5].innerHTML =
'6' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p7 && blcpo > p8) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:7';
document.getElementsByClassName(
"panel-leader-board__item"
)[6].innerHTML =
'7' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p8 && blcpo > p9) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:8';
document.getElementsByClassName(
"panel-leader-board__item"
)[7].innerHTML =
'8' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p9 && blcpo > p10) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:9';
document.getElementsByClassName(
"panel-leader-board__item"
)[8].innerHTML =
'9' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p10 && blcpo > p11) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:10';
document.getElementsByClassName(
"panel-leader-board__item"
)[9].innerHTML =
'10' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p11 && blcpo > p12) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:11';
document.getElementsByClassName(
"panel-leader-board__item"
)[10].innerHTML =
'11' +
lname +
'' +
lprofit +
"";
} else if (blcpo < p12 && blcpo > p13) {
document.getElementsByClassName("position__footer ")[0].innerHTML =
'Your position:12';
document.getElementsByClassName(
"panel-leader-board__item"
)[11].innerHTML =
'12