jeantonickgmail.com / NewAdmin

// ==UserScript==
// @name        NewAdmin
// @namespace   BO
// @include     https://controlpanel.betssonbusiness.com/Bets10*
// @include     https://legacy-controlpanel.betssonbusiness.com/Bets10*/Customer/Overview/*
// @include     /https:\/\/papaasnoak\.ble\.local:5104\/.*\/User\/UsersPaymentOptionGroups.aspx\?userId=.*&siteName=.*&customerReference=/
// @version     1
// @grant       none
// @updateURL   https://openuserjs.org/meta/jeantonickgmail.com/NewAdmin.meta.js
// ==/UserScript==

//function e(){function m(){var a={},b=document.getElementsByClassName("tabsContainer CustomerOverViewContent")[0];a.f=$("[data-uniqueid='Transactions']");a.b=b.getElementsByTagName("input");a.e=b.getElementsByTagName("select");a.c=b.getElementsByTagName("li");for(u in Object.keys(a))for(b=0;b<a[Object.keys(a)[u]].length;b++)a[Object.keys(a)[u]][b].addEventListener("click",c);a={};for(b=0;b<$(".ui-jqgrid-bdiv tr:even").length;b++)$(".ui-jqgrid-bdiv tr:even")[b].style.backgroundColor="rgba(153,255,153,0.5)"; a.background=["rgba(153,255,153,0.4)","rgba(255,204,153,0.4)","rgba(102,204,255,0.4)","rgba(192,192,192,0.5)"];a.green="BonusCompleted Bonus GiveBonus Win Captured Authorized Initiated".split(" ");a.red="BonusExpired AdjustmentWithdrawal Cancelled Rollback BonusLost ChargedBack Error InProcess Refunded Refused RiskFailure UserInteractionRequired ManualCheck ProviderNotificationRequired".split(" ");a.blue=["Bet"];a.d=["Deposit","Withdrawal","Withdraw","CancelWithdrawal","Created"];for(var h=0;2>h;h++){if($("[aria-describedby|='TransactionList_Type']")[0]){if(0== h)var d=$("[aria-describedby|='TransactionList_Type']");1==h&&(d=$("[aria-describedby|='TransactionList_Game']"))}else 0==h&&(d=$("[aria-describedby|='payment_transaction_list_Status']")),1==h&&(d=$("[aria-describedby|='wallet_transaction_list_Type']"));if(0==d.length)break;for(var l=0;l<d.length;l++)for(b=1;b<Object.keys(a).length;b++)-1<a[Object.keys(a)[b]].indexOf(d[l].title)&&(d[l].parentElement.style.backgroundImage="none",d[l].parentElement.style.backgroundColor=a[Object.keys(a)[0]][b-1],d[l].parentElement.style.color= Object.keys(a)[b])}}function c(){console.log("Checking if page is loaded...");0==$(".blockUI.blockMsg.blockElement").length&&"none"==$(".loading").css("display")&&"none"==$("#ui-datepicker-div").css("display")&&4==f?m():setTimeout(function(){c()},200)}-1<document.location.href.indexOf("#Transactions")?c():$("[data-uniqueid='Transactions']")[0].addEventListener("click",c)} if(/https:\/\/papaasnoak\.ble\.local:5104\/.*\/User\/UsersPaymentOptionGroups.aspx\?userId=.*&siteName=.*&customerReference=.*/.test(document.location.href)){var g=window;window.addEventListener("message",function(){var m=["Deposit EntroPay", "Excluding Risky Deposit Methods - PAC", "Mobile - Excluding Risky Deposit Methods","Deposit VPS","Excluding WD Methods","Mobile - Excluding WD Methods"];document.querySelector("#container").setAttribute("style","padding:0");document.querySelectorAll("tr")[0].style.display="none";for(var c=1;c<document.querySelectorAll("tr").length;c++)-1==m.indexOf(document.querySelectorAll("td:nth-child(2)")[c-1].textContent.trim())&& (document.querySelectorAll("tr")[c].style.display="none")},!1);window.top.postMessage("loaded","https://legacy-controlpanel.betssonbusiness.com/*");g.onload=!0}else{var f;(function(m){XMLHttpRequest.prototype.open=function(c,a,b,h,d){this.addEventListener("readystatechange",function(){f=this.readyState},!1);m.call(this,c,a,b,h,d)}})(XMLHttpRequest.prototype.open);window.addEventListener("message",function(){document.querySelector("#ogId").contentWindow.postMessage("executeOrder66","https://papaasnoak.ble.local:5104/*"); document.querySelector("#ogId").style.position="";document.querySelector("#ogId").style.left=""},!1);var k=window;if(-1<document.URL.indexOf("Bets10"))var n="bets10",p="105808357";-1<document.URL.indexOf("CasinoMetropol")&&(n="casinometropol",p="262392498");-1<document.URL.indexOf("CasinoMaxi")&&(n="casinomaxi",p="869897649");var q=document.getElementById("customerId").textContent,r=document.getElementById("customerGuid").textContent,s=document.createElement("iframe");document.getElementById("main").appendChild(s);var t=document.createElement("iframe");t.src="https://papaasnoak.ble.local:5104/Mvc/"+n+".com/CustomerAccounts?userId="+q+"&siteName="+n+".com&customerReference="+r;t.scrolling= "auto";t.width="750px";t.height="1000px";t.style.position="absolute";t.style.top="424px";t.style.left="1140px";t.setAttribute("id","accPane");t.setAttribute("frameborder","0");document.getElementById("main").appendChild(t);var v=document.createElement("iframe");v.src="https://papaasnoak.ble.local:5104/"+n+".com/User/UsersPaymentOptionGroups.aspx?userId="+q+"&siteName="+n+".com";v.setAttribute("scrolling","no");v.width="100%";v.height="220px";v.style.position="absolute";v.style.left="-5000px";v.setAttribute("id", "ogId");v.setAttribute("frameborder","0");var w=document.querySelector("#CustomerOverview ul"),x=document.querySelector("#CustomerOverview ul li:nth-child(2)");w.insertBefore(v,x);k.onload=!0;e()};


function e() {

    function m() {
        var a = {},
            b = document.getElementsByClassName("tabsContainer CustomerOverViewContent")[0];
        a.f = $("[data-uniqueid='Transactions']");
        a.b = b.getElementsByTagName("input");
        a.e = b.getElementsByTagName("select");
        a.c = b.getElementsByTagName("li");
        for (u in Object.keys(a))
            for (b = 0; b < a[Object.keys(a)[u]].length; b++) a[Object.keys(a)[u]][b].addEventListener("click", c);
        a = {};
        for (b = 0; b < $(".ui-jqgrid-bdiv tr:even").length; b++) $(".ui-jqgrid-bdiv tr:even")[b].style.backgroundColor = "rgba(153,255,153,0.5)";
        a.background = ["rgba(153,255,153,0.4)", "rgba(255,204,153,0.4)", "rgba(102,204,255,0.4)", "rgba(192,192,192,0.5)"];
        a.green = "BonusCompleted Bonus GiveBonus Win Captured Authorized Initiated".split(" ");
        a.red = "BonusExpired AdjustmentWithdrawal Cancelled Rollback BonusLost ChargedBack Error InProcess Refunded Refused RiskFailure UserInteractionRequired ManualCheck ProviderNotificationRequired".split(" ");
        a.blue = ["Bet"];
        a.d = ["Deposit", "Withdrawal", "Withdraw", "CancelWithdrawal", "Created"];
        for (var h = 0; 2 > h; h++) {
            if ($("[aria-describedby|='TransactionList_Type']")[0]) {
                if (0 == h) var d = $("[aria-describedby|='TransactionList_Type']");
                1 == h && (d = $("[aria-describedby|='TransactionList_Game']"))
            } else 0 == h && (d = $("[aria-describedby|='payment_transaction_list_Status']")), 1 == h && (d = $("[aria-describedby|='wallet_transaction_list_Type']"));
            if (0 == d.length) break;
            for (var l = 0; l < d.length; l++)
                for (b = 1; b < Object.keys(a).length; b++) - 1 < a[Object.keys(a)[b]].indexOf(d[l].title) && (d[l].parentElement.style.backgroundImage = "none", d[l].parentElement.style.backgroundColor = a[Object.keys(a)[0]][b - 1], d[l].parentElement.style.color = Object.keys(a)[b])
        }
    }

  
  function c() {
        console.log("Checking if page is loaded...");
        0 == $(".blockUI.blockMsg.blockElement").length && "none" == $(".loading").css("display") && "none" == $("#ui-datepicker-div").css("display") && 4 == f ? m() : setTimeout(function() {
            c()
        }, 200)
    } - 1 < document.location.href.indexOf("#Transactions") ? c() : $("[data-uniqueid='Transactions']")[0].addEventListener("click", c)
}
if (/https:\/\/papaasnoak\.ble\.local:5104\/.*\/User\/UsersPaymentOptionGroups.aspx\?userId=.*&siteName=.*&customerReference=.*/.test(document.location.href)) {
    var g = window;
    window.addEventListener("message", function() {
        var m = ["Deposit EntroPay", "Excluding Risky Deposit Methods - PAC", "Mobile - Excluding Risky Deposit Methods", "Deposit VPS", "Excluding WD Methods", "Mobile - Excluding WD Methods" , "Deposit Apx"];
        document.querySelector("#container").setAttribute("style", "padding:0");
        document.querySelectorAll("tr")[0].style.display = "none";
        for (var c = 1; c < document.querySelectorAll("tr").length; c++) - 1 == m.indexOf(document.querySelectorAll("td:nth-child(2)")[c - 1].textContent.trim()) && (document.querySelectorAll("tr")[c].style.display = "none")
    }, !1);
    window.top.postMessage("loaded", "https://legacy-controlpanel.betssonbusiness.com/*");
    g.onload = !0
} else {
    var f;
    (function(m) {
        XMLHttpRequest.prototype.open = function(c, a, b, h, d) {
            this.addEventListener("readystatechange", function() {
                f = this.readyState
            }, !1);
            m.call(this, c, a, b, h, d)
        }
    })(XMLHttpRequest.prototype.open);
    window.addEventListener("message", function() {
        document.querySelector("#ogId").contentWindow.postMessage("executeOrder66", "https://papaasnoak.ble.local:5104/*");
        document.querySelector("#ogId").style.position = "";
        document.querySelector("#ogId").style.left = ""
    }, !1);
    var k = window;
    if (-1 < document.URL.indexOf("Bets10")) var n = "bets10",
        p = "105808357"; - 1 < document.URL.indexOf("CasinoMetropol") && (n = "casinometropol", p = "262392498"); - 1 < document.URL.indexOf("CasinoMaxi") && (n = "casinomaxi", p = "869897649");
    var q = document.getElementById("customerId").textContent;
    var r = document.getElementById("customerGuid").textContent;
           
    var t = document.createElement("iframe");
    t.src = "https://papaasnoak.ble.local:5104/Mvc/" + n + ".com/CustomerAccounts?userId=" + q + "&siteName=" + n + ".com&customerReference=" + r;
    t.scrolling = "auto";
    t.width = "750px";
    t.height = "2000px";
    t.style.position = "absolute";
    t.style.top = "10px";
    t.style.left = "1140px";
    t.setAttribute("id", "accPane");
    t.setAttribute("frameborder", "0");
    document.getElementById("main").appendChild(t);
    var v = document.createElement("iframe");
    v.src = "https://papaasnoak.ble.local:5104/" + n + ".com/User/UsersPaymentOptionGroups.aspx?userId=" + q + "&siteName=" + n + ".com&customerReference=" + r;
    v.setAttribute("scrolling", "no");
    v.width = "100%";
    v.height = "240px";
    v.style.position = "absolute";
    v.style.left = "-5000px";
    v.setAttribute("id", "ogId");
    v.setAttribute("frameborder", "0");
    var w = document.querySelector("#CustomerOverview ul"),
        x = document.querySelector("#CustomerOverview ul li:nth-child(2)");
	    w.insertBefore(v, x);
	k.onload = !0;
    e()
};