Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.querySelectorAll("img.defaultuserpic") // seleccionem totes les imatges que són de perfils sense imatge
- .forEach(
- function(el) { // per cada imatge apliquem la següent funció
- var td = el.parentElement.parentElement; // seleccionem l'element HTML cel·la (td). Serà la segona de la fila
- // mirem si la persona ha entrat mai o no (a l'última cel·la hi surt el text "Mai"
- if (td.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.innerHTML != "Mai") {
- // no ha entrat mai, per tant seleccionem la casella de verificació de la primera cel·la
- td.previousElementSibling.firstChild.checked=true;
- }
- }
- );
Add Comment
Please, Sign In to add comment