Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var highlight = "Фамилия";
(function() {
"use strict";
var rows = document.getElementsByClassName("st_team");
var finded;
for(var i = 1; i < rows.length - 3; i++) {
if(rows[i].innerHTML.indexOf(highlight) !== -1)
finded = rows[i];
}
if(finded === undefined)
return;
finded.parentElement.style.background = "#fbffbd";
var titleRow = rows[0].parentElement.childNodes;
var findedRow = finded.parentElement.childNodes;
for(var i = 2; i < titleRow.length - 2; i++) {
if(titleRow[i].innerHTML.indexOf("u") !== -1) {
if(findedRow[i].innerHTML.indexOf("<b>") !== -1) {
//bold means completed
findedRow[i].style.background = "#b9ffa7";
} else {
if(findedRow[i].innerHTML.indexOf("0") !== -1) {
//not completed, but tried to
findedRow[i].style.background = "#ff8800";
} else {
//skipped
findedRow[i].style.background = "#ff3800";
}
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.