Hofhund wrote:
@ArMaTa
nice job.
Can you extend the script that the points where not ready for EA was given out?
Hofhund
Hi all.
I update my script.
This version show each milestones status and a list of critical states before EA release.
JavaScript Source Code
- // ==UserScript==
- // @name RoadMap
- // @namespace Armata_CnC
- // @include https://*cattleandcrops.com/roadmap*
- // @version 1.1
- // @grant none
- // ==/UserScript==
- document.load=main();
- function main(){
- var avancementMS1=0;
- var countMS1 = 0;
- var avancementMS2=0;
- var countMS2 = 0;
- var avancementMS3=0;
- var countMS3 = 0;
- var avancementMS4=0;
- var countMS4 = 0;
- var ms1EA= [];
- $(".roadmap").each(function(){
- if($(this).find(".roadmap").length<1){
- if($(this).html().indexOf("MS1")>0){
- if(typeof $(this).find(".progress").find("div").css("width")!= 'undefined' && $(this).find(".progress").find("div").css("width").indexOf("%")>0){
- avancementMS1+=parseInt($(this).find(".progress").find("div").css("width").replace("%",""));
- countMS1++;
- if(parseInt($(this).find(".progress").find("div").css("width").replace("%",""))<70){
- ms1EA.push([$(this).find(".section-heading")[0].firstChild.textContent.trim(),parseInt($(this).find(".progress").find("div").css("width").replace("%",""))])
- }
- }
- }else if($(this).html().indexOf("MS2")>0){
- if(typeof $(this).find(".progress").find("div").css("width")!= 'undefined' && $(this).find(".progress").find("div").css("width").indexOf("%")>0){
- avancementMS2+=parseInt($(this).find(".progress").find("div").css("width").replace("%",""));
- countMS2++;
- }
- }else if($(this).html().indexOf("MS3")>0){
- if(typeof $(this).find(".progress").find("div").css("width")!= 'undefined' && $(this).find(".progress").find("div").css("width").indexOf("%")>0){
- avancementMS3+=parseInt($(this).find(".progress").find("div").css("width").replace("%",""));
- countMS3++;
- }
- }else if($(this).html().indexOf("MS4")>0){
- if(typeof $(this).find(".progress").find("div").css("width")!= 'undefined' && $(this).find(".progress").find("div").css("width").indexOf("%")>0){
- avancementMS4+=parseInt($(this).find(".progress").find("div").css("width").replace("%",""));
- countMS4++;
- }
- }
- }
- });
- alert("MS1 Progress: "+(Math.round(avancementMS1*10/countMS1)/10)+"%\r\nMS2 Progress: "+(Math.round(avancementMS2*10/countMS2)/10)+"%\r\nMS3 Progress: "+(Math.round(avancementMS3*10/countMS3)/10)+"%\r\nMS4 Progress: "+(Math.round(avancementMS4*10/countMS4)/10)+"%");
- var ms1 = "";
- for(var i= 0; i < ms1EA.length; i++){
- ms1+=" - "+ms1EA[i][0]+" @ "+ms1EA[i][1]+"%\r\n";
- }
- alert("Required before Early Access (<70%):\r\n"+ms1);
- }
Life is short, play more.