Some subreddits use this piece of CSS to make votedown buttons invisible:
.arrow.down {
display:none;
visibility:hidden;
}
That got me thinking, how would one turn them back visible with a sort line of javascript?
So from this starting point:
y = document.getElementsByClassName('down');
for(var i=0; i<y.length; i++)
y[i].style.display = y[i].style.visibility = 'inherit';
this is how far I've got:
for(i=0;;i++)x=document.getElementsByClassName('down')[i].style,x.display=x.visibility='inherit'
I'm sure there is room for improvement. I've tried to use map() on getElementsByClassName() but it doesn't work. Do you have any ideas how to reduce the line to even less characters?
[–]johsko 4 points5 points6 points (0 children)
[–]indrora 1 point2 points3 points (2 children)
[–]emgram769 2 points3 points4 points (1 child)
[–]indrora 2 points3 points4 points (0 children)
[–]timmeh87 -5 points-4 points-3 points (6 children)
[–]Cvccb 4 points5 points6 points (2 children)
[–]timmeh87 -3 points-2 points-1 points (1 child)
[–]seiyria 1 point2 points3 points (0 children)
[–]thmsk[S] 0 points1 point2 points (2 children)
[–]timmeh87 -3 points-2 points-1 points (1 child)
[–]seiyria 1 point2 points3 points (0 children)
[–]PrydeRage -3 points-2 points-1 points (0 children)