18

For technical reasons(*) I'm following a chat room by reading the transcript rather than visiting the chat room itself.

The problem is, there is this one user who keeps disrupting any conversation with unsolicited comments, for example when he enters the chat, when other users enter the chat, when he has stomachache, when he leaves for the bathroom, when he comes back from the bathroom, etc. - to put it mildly, it is disgusting, I don't need these images in my head...

Unfortunately the ignore user option only works for the chatroom itself and not for the transcript.

Is there a way to hide the messages of one user from the transcript, maybe with a userscript?

(*) On a slow Internet connection I often get stuck at the "Loading the room. Please wait"-screen. The chat is loaded in the background, I can interact with it via keyboard shortcuts, write messages etc., but the semi-transparent foreground message does not go away which makes it really hard to read anything, so I use the transcript for reading messages.

6
  • Note that in my experience, a bounty doesn't really help getting an official response from SE. For other ways of getting attention for this request, I'd take a look at How do I get attention for old, unfixed bug reports and feature requests without official responses here on Meta?. Commented Sep 28, 2019 at 21:29
  • @SonictheAnonymousHedgehog Thanks for your comment, but I'm not necessarily looking for an official response, some solution by the community (e.g. a userscript) is equally welcome and to quote you "it's a good way to get community input, but not official input." Commented Sep 28, 2019 at 21:46
  • Well, every message from the user will be contained in a <div> that matches the selector .monologue.user-[user ID #]. You could add display:none; as CSS to the page for that selector, using either a userscript or an extension that allows you to add arbitrary CSS. (On Firefox, you also have the option to add the CSS to your "userContent.css" file for that profile). I haven't looked at where SE Chat stores the list of users you've ignored, but it's likely that a userscript could be created that fetches that information and automatically hides messages from ignored users.
    – Makyen
    Commented Sep 29, 2019 at 19:29
  • @Makyen Thanks a lot for your comment! The user id won't be a problem, I only have this one ignores user, so I could hardcode it. I'll have a look into creating a user script for this (but first I'll have to decide if it is worth the effort, the whole Monica incident makes me think about leaving...) Commented Sep 29, 2019 at 19:38
  • 2
    I can understand your concern over what's going on. I share it. More information about the underlying issue would be quite helpful. However... Well, if you already use userscripts, adding one to do this is quite easy. You really only need one line in the userscript. It could be something like: document.documentElement.insertAdjacentHTML('beforeend', '<style type="text/css">.monologue.user-[user ID #] {display:none;}</style>');
    – Makyen
    Commented Sep 29, 2019 at 20:00
  • 2
    @Makyen This works fantastic! Thank you so much! Would you like to convert it into an answer? Commented Sep 29, 2019 at 20:54

1 Answer 1

4

The following userscript is based on the fantastic comment from @Makyen (therefore making this a community wiki answer)

// ==UserScript==
// @name        Ignore user in transcript
// @match       *://chat.stackexchange.com/transcript/*
// @grant       none
// @run-at      document-start
// ==/UserScript==

document.documentElement.insertAdjacentHTML('beforeend', '<style type="text/css">.monologue.user-249772 {display:none;}</style>');

(replace 249772 with the ID of the user you'd like to ignore)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .