-
-
Save bugaevc/c3dfd00e29dd2dcef135 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
var highlight = "NAME GOES HERE"; | |
(function() { | |
"use strict"; | |
var rows = document.getElementsByClassName("st_team"); | |
var found; | |
for(var i = 1; i < rows.length - 3; i++) | |
if(rows[i].innerHTML.indexOf(highlight) !== -1) | |
found = rows[i]; | |
if(found === undefined) | |
return; | |
found.parentElement.style.background = "#C5C5C5"; // grey | |
var titleRow = rows[0].parentElement.childNodes; | |
var foundRow = found.parentElement.childNodes; | |
for(var i = 2; i < titleRow.length - 2; i++) | |
if(titleRow[i].innerHTML.indexOf("u") !== -1) | |
// up-smth | |
if(foundRow[i].innerHTML.indexOf("<b>") !== -1) | |
// bold means completed | |
foundRow[i].style.background = "#4CAF50"; // green | |
else if(foundRow[i].innerHTML.indexOf("0") !== -1) | |
// not completed, but tried to | |
foundRow[i].style.background = "#FF9800"; // orange | |
else | |
//skipped | |
foundRow[i].style.background = "#F44336"; // red | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment