jscher2000 / De-Troll-YouTube---Hide-Unwanted-Commenters

For firefox: Right-click a comment (or reply) to hide the commenter using their channel ID. Not an official YouTube extension.
Mozilla Public License 2.0
2 stars 0 forks source link

Quicker way to block comments than Rightclick? #3

Closed Ezelmannen closed 1 year ago

Ezelmannen commented 3 years ago

As said before, I love the idea of this Add-on, but it is a bit cumbersome to use when you want to block a lot of commenters. Is there a possibility for you to add a quicker way to block commenters? Perhaps by adding a Red X after the usersname one can click in the render of the page. Or maybe holding ctrl+leftclick on a username blocks it?

jscher2000 commented 3 years ago

I created a version 0.6 that inserts a little trash can button next to each commenter name. Only tested lightly, but seems to work. Let me know if you discover any glitches.

Ezelmannen commented 3 years ago

Thanks for updating so quickly! But unfortunately it didn't work over here. :-/

I've updated the Add-on, Stopped all other Add-ons, Restarted Firefox, and end up with this: image It seems like it inserts a lot of buttons, but no icon perhaps?

I did a "show selection source" of the affected parts. I hope that can help troubleshoot it:


        <a id="author-text" class="yt-simple-endpoint style-scope ytd-comment-renderer" href="/channel/UCvAKSZj_4veP6V--pSoP61A">
          <span class="style-scope ytd-comment-renderer">
            OmegaVideoGameGod
          </span>
        </a>
        <button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button><span id="author-comment-badge" class="style-scope ytd-comment-renderer" hidden=""></span>
        <span id="sponsor-comment-badge" class="style-scope ytd-comment-renderer" hidden=""></span>

        <yt-formatted-string class="published-time-text above-comment style-scope ytd-comment-renderer" has-link-only_=""><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="/watch?v=ajVqrIu6aG8&amp;lc=Ugz-o4jT_c2mPaJErLN4AaABAg" dir="auto">9 hours ago</a></yt-formatted-string>
        <span id="author-reputation" class="style-scope ytd-comment-renderer"></span>
        <span id="sponsors-only-badge" class="style-scope ytd-comment-renderer" hidden=""></span>

        <span id="moderation-reason-divider" class="style-scope ytd-comment-renderer" hidden="">
          •
        </span>
        <span id="moderation-reason-text" class="style-scope ytd-comment-renderer" hidden="">

        </span>
      </div>```
jscher2000 commented 3 years ago

The details of the button template are defined here:

https://github.com/jscher2000/De-Troll-YouTube---Hide-Unwanted-Commenters/blob/master/de-troll-content.js#L132

For some reason, that is getting skipped or failing on yours, but I couldn't tell you why, It's probably easier for me to move lines 134-137 up to line 106.

Could you test unchecking and re-checking the box on the Options tab for the extension to see whether that helps at all?

jscher2000 commented 3 years ago

Okay, hopefully version 0.6.1 has fixed it.

Ezelmannen commented 3 years ago

Now it works. Great! Though, I've noticed the Trashcan renders on the left side of the Username sometimes and there is a check mark on the right side. It seems to be rare though, only seen it twice on the video I scrolled through now: image Still, it seems to work. :-)

jscher2000 commented 3 years ago

I noticed left side when the channel name shows instead of the author name. Not sure if there are other times that it happens. I wonder what the checkmark means? (I hardly use YouTube in a browser, mostly in the mobile app.)

Edit: For Verified users, Google hides the first author name and shows a special tag. So I need to move the trash can in that case.