Hide pics and blur names in "shared" at character.ai

Adds switches to blur AI images and to hide you\char's names\avatars in "shared" conversations.

// ==UserScript==
// @name        Hide pics and blur names in "shared" at character.ai
// @namespace   https://sleazyfork.org/en/users/927364-mozgovlom
// @match       https://beta.character.ai/post?post=*
// @match       https://beta.character.ai/post/raw?post=*
// @grant       none
// @version     0.1
// @author      Mozgovlom
// @description Adds switches to blur AI images and to hide you\char's names\avatars in "shared" conversations.
// @icon          https://characterai.io/static/logo512.png

// ==/UserScript==
'use strict';

window.addEventListener('load', function () {

  let styleHideImgButt = document.createElement('style');
  styleHideImgButt.innerHTML = `
  .hideImg-btn {
    cursor: pointer;
    user-select: none;
    border: 3px solid gray;
    padding: 4px;
    width: 9%;
    position: fixed;
    bottom: 1%;
    left: 0%;
    background-color: lightsteelblue;
    color: black;
    font-weight: bold;
    text-align: center;
    z-index: 100;
    margin: 0 0 0 4px;
    border-radius: 0 0 0 0;
  }
  .hideImg-btn:hover {
    background:#789ac7;
  }
  .blur-btn {
    cursor: pointer;
    user-select: none;
    border: 3px solid gray;
    padding: 4px;
    width: 9%;
    position: fixed;
    bottom: 1%;
    left: 9%;
    background-color: lightsteelblue;
    color: black;
    font-weight: bold;
    text-align: center;
    z-index: 100;
    margin: 0 0 0 4px;
    border-radius: 0 0 0 0;
  }
  .blur-btn:hover {
    background:#789ac7;
  }
  `
  document.body.appendChild(styleHideImgButt);

  let styleHideImg = document.createElement('style');
  styleHideImg.classList.add("styleHideImg");
  styleHideImg.innerHTML = `
    div[class="col ms-2 pb-2"]>img {display: none !important;}
  `
  let styleBlur = document.createElement('style');
  styleBlur.classList.add("styleBlur");
  styleBlur.innerHTML = `
    div[class=" sb-avatar sb-avatar--src"] {filter: blur(7px) !important;}
    div[class=" sb-avatar__text"] {filter: blur(7px) !important;}
    div[class*="msg-author-name"] {filter: blur(5px) !important; text-decoration:line-through; text-decoration-color:black; text-decoration-style:wavy; text-decoration-thickness:5px;}
    a[role="button"][href="/profile/"] {filter: blur(5px) !important; text-decoration:line-through; text-decoration-color:black; text-decoration-style:wavy; text-decoration-thickness:5px;}
    a[role="button"][href*="/post?post="] {filter: blur(5px) !important; text-decoration:line-through; text-decoration-color:black; text-decoration-style:wavy; text-decoration-thickness:5px;}
  `

  let buttonBlur = document.createElement('div');
  buttonBlur.innerHTML = "Blur names";
  buttonBlur.onclick = function (){
    if (document.querySelectorAll('style[class="styleBlur"]').length) {
      document.body.removeChild(styleBlur);
      buttonBlur.innerHTML = "Blur names";
    } else {
      document.body.appendChild(styleBlur);
      buttonBlur.innerHTML = "UNBLUR names";
    }
  };
  buttonBlur.classList.add("blur-btn");
  document.body.appendChild(buttonBlur);

  let buttonhideImg = document.createElement('div');
  buttonhideImg.innerHTML = "Hide ImageGen";
  buttonhideImg.onclick = function (){
    if (document.querySelectorAll('style[class="styleHideImg"]').length) {
      document.body.removeChild(styleHideImg);
      buttonhideImg.innerHTML = "Hide ImageGen";
    } else {
      document.body.appendChild(styleHideImg);
      buttonhideImg.innerHTML = "SHOW ImageGen";
    }
  };
  buttonhideImg.classList.add("hideImg-btn");
  document.body.appendChild(buttonhideImg);


}, false);