
Show HN: Scriptlet to remove greyed out comments on HN - htk
Hello everyone,<p>I frequently send the comments from an article on HN to a TTS software I use on my iPhone called Voice Dream Reader. The only problem for me was listening to a greyed out comment and its children. Although valid discussions can be had in these situations, the majority in my opinion could be eliminated, so I created a scriptlet to do just that.<p>I decided to share it here in case someone else finds it useful:<p><pre><code>  javascript:void%20function()%7Bvar%20e=document.getElementsByClassName(%22commtext%22),n=0,t=0,a=!1;for(i%20in%20e)n=e%5Bi%5D.parentElement.parentElement.parentElement.children%5B0%5D.children%5B0%5D.width,1==a%26%26(n%3Et%3Fe%5Bi%5D.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.hidden=!0:a=!1),0==e%5Bi%5D.classList.contains(%22c00%22)%26%260==a%26%26(a=!0,t=n,e%5Bi%5D.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.hidden=!0)%7D();</code></pre>
======
zzo38computer
I instead put a CSS code to ungrey the comments so that they are black and all
are visible, because, I prefer the opposite to what you mention. Of course,
the system enables both to be done, so that is good. (I also would want them
to be sorted by time rather than what it currently does.)

However, I don't know if some comments might contain codes which are not
spoken properly by a screen reader voice.

~~~
zzo38computer
Also, to draw lines where is the indentations for replies to make it more
clear to follow them, I also did. In case it may be useful to anyone who reads
this, here is the CSS code that I used:

    
    
      div.comment * {
        color: #000000 !important;
      }
      .ind {
        background: url(file:///var/www/img_1C/bg1.png);
      }
    

The file bg1.png is generated from a XPM file:

    
    
      ! XPM2
      40 2 2 1
      . c none
      # c #888888
      ...................#....................
      ........................................

------
gus_massa
I'd recommend eliminating only the comments with -2 or less point and
listening to the comments with -1 or 0. The points are not visible, but
looking at the gray tone you can guess how many downvotes it has.

Disclaimer: I like to upvote gray comments when they are not offensive or very
wrong.

~~~
htk
Good idea, I'll experiment on that. Thanks!

