3 ms·
document.querySelectorAll("td.subtext").forEach( function(currentValue, currentIndex, listObj) { currentValue.hidden = true; } );
by samat 9y ago
document.querySelectorAll("td.subtext").forEach(
function(currentValue, currentIndex, listObj) {
currentValue.hidden = true;
}
);
- polote 9y agoyou can't use forEach with a NodeList ;)
- sillysaurus3 9y agoJS's lack of macros strikes again.
- AgentME 9y agoEasiest solution is to wrap the NodeList with Array.from(...) first. Just wanted to point out how handy that function is. Also if we're going to make a snazzy one-liner, let's cut out the unused arguments: Array.from(document.querySelectorAll("td.subtext")).forEach(currentValue => { currentValue.hidden = true; });
- AndrewCHM 9y agoor just inject (via extension or JS) .itemlist .subtext {display: none;}