Last active
October 1, 2018 05:31
-
-
Save iamCristYe/8b4336cf4f5339ad32b4e707630fd46a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @id Agent-Stats-Export-Colorful | |
// @author @iamCristYe | |
// @name Agent-Stats-Export-Colorful | |
// @namespace Agent-Stats-Export-Colorful | |
// @version 1.0 | |
// @description show medal level for stats | |
// @include https://www.agent-stats.com/export* | |
// @grant none | |
// ==/UserScript== | |
var medals = [ | |
[false], | |
[false], | |
[false], | |
[true, 100, 1000, 2000, 10000, 30000], // explorer Unique Portals Visited | |
[false], | |
[true, 10, 50, 200, 500, 5000], // seer Seer points | |
[false], | |
[true, 100, 750, 2500, 5000, 10000],// recon OPR Agreements | |
[true, 10, 100, 300, 1000, 2500], // trekker Distance Walked | |
[true, 2000, 10000, 30000, 100000, 200000], // builder Resonators Deployed | |
[true, 50, 1000, 5000, 25000, 100000], // connector Links Created | |
[true, 100, 500, 2000, 10000, 40000], // mind-controller Control Fields Created | |
[true, 5000, 50000, 250000, 1000000, 4000000], // illuminator Mind Units Captured | |
[false], | |
[false], | |
[true, 100000, 1000000, 3000000, 10000000, 25000000], // recharger XM Recharged | |
[true, 100, 1000, 5000, 15000, 40000], // liberator Portals Captured | |
[true, 20, 200, 1000, 5000, 20000], // pioneer Unique Portals Captured | |
[true, 150, 1500, 5000, 20000, 50000],// engineer Mods Deployed | |
[true, 2000, 10000, 30000, 100000, 300000], // purifier Resonators Destroyed | |
[false], | |
[false], | |
[false], | |
[false], | |
[false], | |
[false], | |
[false], | |
[false], | |
[true, 5, 25, 100, 200, 500], // specops Unique Missions Completed | |
[true, 1, 3, 6, 10, 20],// missionday Mission Day(s) Attended | |
[true, 1, 5, 10, 25, 50], // nl-1331-meetups NL-1331 Meetup(s) Attended | |
[true, 2000, 10000, 30000, 100000, 200000],// hacker Hacks | |
[true, 200, 2000, 6000, 20000, 50000],// translator Glyph Hack Points | |
[true, 15, 30, 60, 180, 360], // sojourner Longest Hacking Streak | |
[true, 2, 10, 25, 50, 100], // recruiter Agents successfully recruited | |
[false] | |
] | |
for (let row = 1; row < document.getElementsByTagName("Table")[0].getElementsByTagName("tr").length; row++) { //loop for each row | |
for (let column = 0; column < 36; column++) { | |
if (medals[column]) { //medal exists for this column | |
var number = document.getElementsByTagName("Table")[0].getElementsByTagName("tr")[row].getElementsByTagName("td")[column].innerText; | |
if (number > medals[column][5]) { | |
document.getElementsByTagName("Table")[0].getElementsByTagName("tr")[row].getElementsByTagName("td")[column].style.color = "#262626" | |
} | |
else if (number > medals[column][4]) { | |
document.getElementsByTagName("Table")[0].getElementsByTagName("tr")[row].getElementsByTagName("td")[column].style.color = "#5E5E5E" | |
} | |
else if (number > medals[column][3]) { | |
document.getElementsByTagName("Table")[0].getElementsByTagName("tr")[row].getElementsByTagName("td")[column].style.color = "#C3A77C" | |
} | |
else if (number > medals[column][2]) { | |
document.getElementsByTagName("Table")[0].getElementsByTagName("tr")[row].getElementsByTagName("td")[column].style.color = "#394142" | |
} | |
else if (number > medals[column][1]) { | |
document.getElementsByTagName("Table")[0].getElementsByTagName("tr")[row].getElementsByTagName("td")[column].style.color = "#49200B" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment