// ==UserScript== // @name MoxxiMod // @namespace https://studiomoxxi.com/ // @description one click at a time // @author Ben // @match *.outwar.com/* // @version 5.5 // @grant GM_xmlhttpRequest // @license MIT // @grant GM_getResourceText // @grant GM_addStyle // @require http://code.jquery.com/jquery-3.6.0.min.js // @downloadURL none // ==/UserScript== // TRADE PAGE if (document.URL.indexOf("trade") != -1 ) { var cat4 = document.querySelector("#divTrade > div:nth-child(4)").innerHTML if (cat4.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(4){display:none !important;}`) var cat5 = document.querySelector("#divTrade > div:nth-child(5)").innerHTML if (cat5.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(5){display:none !important;}`) var cat6 = document.querySelector("#divTrade > div:nth-child(6)").innerHTML if (cat6.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(6){display:none !important;}`) var cat7 = document.querySelector("#divTrade > div:nth-child(7)").innerHTML if (cat7.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(7){display:none !important;}`) var cat8 = document.querySelector("#divTrade > div:nth-child(8)").innerHTML if (cat8.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(8){display:none !important;}`) var cat9 = document.querySelector("#divTrade > div:nth-child(9)").innerHTML if (cat9.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(9){display:none !important;}`) var cat10 = document.querySelector("#divTrade > div:nth-child(10)").innerHTML if (cat10.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(10){display:none !important;}`) var cat11 = document.querySelector("#divTrade > div:nth-child(11)").innerHTML if (cat11.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(11){display:none !important;}`) var cat12 = document.querySelector("#divTrade > div:nth-child(12)").innerHTML if (cat12.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(12){display:none !important;}`) var cat13 = document.querySelector("#divTrade > div:nth-child(13)").innerHTML if (cat13.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(13){display:none !important;}`) var cat14 = document.querySelector("#divTrade > div:nth-child(14)").innerHTML if (cat14.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(14){display:none !important;}`) var cat15 = document.querySelector("#divTrade > div:nth-child(15)").innerHTML if (cat15.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(15){display:none !important;}`) var cat16 = document.querySelector("#divTrade > div:nth-child(16)").innerHTML if (cat16.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(16){display:none !important;}`) var cat17 = document.querySelector("#divTrade > div:nth-child(17)").innerHTML if (cat17.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(17){display:none !important;}`) var cat18 = document.querySelector("#divTrade > div:nth-child(18)").innerHTML if (cat18.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(18){display:none !important;}`) var cat19 = document.querySelector("#divTrade > div:nth-child(19)").innerHTML if (cat19.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(19){display:none !important;}`) var cat20 = document.querySelector("#divTrade > div:nth-child(20)").innerHTML if (cat20.match(/You have no items in this category/i) != null) GM_addStyle (`#divTrade > div:nth-child(20){display:none !important;}`) } // PVP BRAWL if (document.URL.indexOf("closedpvp") != -1 ) { GM_addStyle ( ` #content-header-row > div:nth-child(4){display:none !important;} .col-lg-6 {-ms-flex: 0 0 100%;flex: 0 0 100%;max-width: 100%;} #content-header-row > div > div > h4{margin-bottom:20px !important;} #content-header-row > h2{display:none !important;} #content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > thead > tr{background:#020202 !important;} #content-header-row > div > div > div > table > tbody > tr,#content-header-row > div > div > table > tbody > tr{background:#0F0F0F !important;border-bottom: #454545 solid 1px !important;} #content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > thead > tr > th:nth-child(6) > a {color: #d4d4d4 !important;} #content-header-row > div:nth-child(2) > div:nth-child(4){display:none !important;} `) var brawlclosed = ''; if (document.querySelector("#content-header-row > div:nth-child(2) > div:nth-child(1) > h5") != null) brawlclosed = document.querySelector("#content-header-row > div:nth-child(2) > div:nth-child(1) > h5").innerHTML if (document.querySelector("#content-header-row > div:nth-child(2) > div:nth-child(1) > h5") == null) brawlclosed = null var brawlchars = ''; if (brawlclosed == "Brawl starts in") brawlchars = document.querySelector("#content-header-row > div:nth-child(3) > div").innerHTML if (brawlclosed != "Brawl starts in") brawlchars = document.querySelector("#content-header-row > div:nth-child(4) > div").innerHTML if (brawlclosed == null) brawlchars = document.querySelector("#content-header-row > div:nth-child(4) > div").innerHTML if (brawlclosed == "Brawl starts in"){ GM_addStyle( ` #content-header-row > div:nth-child(3) > div.widget-content.widget-content-area{display:none !important;} `)} var brawlcharsnew = `
` function insertAfter(newNode, existingNode) { existingNode.parentNode.insertBefore(newNode, existingNode.nextSibling); } let brawltable = document.querySelector("#content-header-row > div:nth-child(3)"); let brawlsection = document.createElement('div'); brawlsection.innerHTML = brawlcharsnew; insertAfter(brawlsection, brawltable.children[0]); let brawlcharheader = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > thead > tr") let headerTD1 = document.createElement('th'); headerTD1.innerHTML = `POWER`; insertAfter(headerTD1, brawlcharheader.lastElementChild); let headerTD2 = document.createElement('th'); headerTD2.innerHTML = "ITEMS"; insertAfter(headerTD2, brawlcharheader.lastElementChild); let headerTD3 = document.createElement('th'); headerTD3.innerHTML = "CIRCLE OF PROTECTION"; insertAfter(headerTD3, brawlcharheader.lastElementChild); var rank01 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(1) > td:nth-child(1)") var rank02 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(2) > td:nth-child(1)") var rank03 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(3) > td:nth-child(1)") var rank04 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(4) > td:nth-child(1)") var rank05 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(5) > td:nth-child(1)") var rank06 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(6) > td:nth-child(1)") var rank07 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(7) > td:nth-child(1)") var rank08 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(8) > td:nth-child(1)") var rank09 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(9) > td:nth-child(1)") var rank10 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(10) > td:nth-child(1)") var rank11 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(11) > td:nth-child(1)") var rank12 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(12) > td:nth-child(1)") var rank13 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(13) > td:nth-child(1)") var rank14 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(14) > td:nth-child(1)") var rank15 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(15) > td:nth-child(1)") var rank16 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(16) > td:nth-child(1)") var rank17 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(17) > td:nth-child(1)") var rank18 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(18) > td:nth-child(1)") var rank19 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(19) > td:nth-child(1)") var rank20 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(20) > td:nth-child(1)") var rank21 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(21) > td:nth-child(1)") var rank22 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(22) > td:nth-child(1)") var rank23 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(23) > td:nth-child(1)") var rank24 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(24) > td:nth-child(1)") var rank25 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(25) > td:nth-child(1)") var rank26 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(26) > td:nth-child(1)") var rank27 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(27) > td:nth-child(1)") var rank28 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(28) > td:nth-child(1)") var rank29 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(29) > td:nth-child(1)") var rank30 = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child(30) > td:nth-child(1)") if (rank01 != null){rank01.innerHTML = "1 (20 coins)"} if (rank02 != null){rank02.innerHTML = "2 (17 coins)"} if (rank03 != null){rank03.innerHTML = "3 (15 coins)"} if (rank04 != null){rank04.innerHTML = "4 (14 coins)"} if (rank05 != null){rank05.innerHTML = "5 (11 coins)"} if (rank06 != null){rank06.innerHTML = "6 (10 coins)"} if (rank07 != null){rank07.innerHTML = "7 (10 coins)"} if (rank08 != null){rank08.innerHTML = "8 (10 coins)"} if (rank09 != null){rank09.innerHTML = "9 (9 coins)"} if (rank10 != null){rank10.innerHTML = "10 (9 coins)"} if (rank11 != null){rank11.innerHTML = "11 (9 coins)"} if (rank12 != null){rank12.innerHTML = "12 (8 coins)"} if (rank13 != null){rank13.innerHTML = "13 (8 coins)"} if (rank14 != null){rank14.innerHTML = "14 (8 coins)"} if (rank15 != null){rank15.innerHTML = "15 (7 coins)"} if (rank16 != null){rank16.innerHTML = "16 (7 coins)"} if (rank17 != null){rank17.innerHTML = "17 (7 coins)"} if (rank18 != null){rank18.innerHTML = "18 (6 coins)"} if (rank19 != null){rank19.innerHTML = "19 (6 coins)"} if (rank20 != null){rank20.innerHTML = "20 (6 coins)"} if (rank21 != null){rank21.innerHTML = "21 (5 coins)"} if (rank22 != null){rank22.innerHTML = "22 (5 coins)"} if (rank23 != null){rank23.innerHTML = "23 (5 coins)"} if (rank24 != null){rank24.innerHTML = "24 (5 coins)"} if (rank25 != null){rank25.innerHTML = "25 (5 coins)"} if (rank26 != null){rank26.innerHTML = "26 (4 coins)"} if (rank27 != null){rank27.innerHTML = "27 (4 coins)"} if (rank28 != null){rank28.innerHTML = "28 (4 coins)"} if (rank29 != null){rank29.innerHTML = "29 (4 coins)"} if (rank30 != null){rank30.innerHTML = "30 (4 coins)"} var totalMembers = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table").rows.length; fetch("profile") .then (response => response.text()) .then((response) => { var mypower = response.match(/TOTAL POWER.*[\n\r].*(.*)<\/font><\/b><\/td>/i) var mytotalpower = parseInt(mypower[1].replace(",","")) for (let rownum = 1; rownum < parseInt(totalMembers); rownum++) { var charList = document.querySelector("#content-header-row > div:nth-child(3) > div:nth-child(2) > div > table > tbody > tr:nth-child("+rownum+") > td:nth-child(2) > a").outerHTML.replace(/.*<\/a>/,"") fetch(charList) .then (response => response.text()) .then((response) => { var coptime = response.match(/Circle of Protection<\/b>