152
edições
REMOVA OS ANÚNCIOS!
Apoiando através de https://apoia.se/arddhu a partir do tier de Apoiador, você pode navegar na wiki sem anúncios e ainda colabora com o projeto!
Sem resumo de edição |
Sem resumo de edição |
||
Linha 19: | Linha 19: | ||
/* Get the two elements you want to compare, | /* Get the two elements you want to compare, | ||
one from current row and one from the next: */ | one from current row and one from the next: */ | ||
x = rows[i].querySelector("span.mw-headline"); | x = rows[i].querySelector("h3>span.mw-headline"); | ||
y = rows[i + 1].querySelector("span.mw-headline"); | y = rows[i + 1].querySelector("h3>span.mw-headline"); | ||
// check if the two rows should switch place: | // check if the two rows should switch place: | ||
if (x.getAttribute("id").toLowerCase() > y.getAttribute("id").toLowerCase() ) { | if (x.getAttribute("id").toLowerCase() > y.getAttribute("id").toLowerCase() ) { |