Fk chai limits

Ten skrypt nie powinien być instalowany bezpośrednio. Jest to biblioteka dla innych skyptów do włączenia dyrektywą meta // @require https://update.greatest.deepsurf.us/scripts/571951/1787236/Fk%20chai%20limits.js

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Fk chai limits
// @namespace   Violentmonkey Scripts
// @match       *://*.chai-research.com/chat/*
// @icon        https://web.chai-research.com/favicon.ico
// @grant       none
// @version     1.2
// @author      SkipUsernameRE
// ==/UserScript==

(function() {
  'use strict';

  setInterval(() => {
    localStorage.setItem("conversation_turns", "0");
  }, 1000);

  const observer = new MutationObserver(() => {
    const divs = document.querySelectorAll(
      'div.self-start.mr-10.flex.flex-row.gap-4.my-2.sm\\:my-4.items-start.relative'
    );

    divs.forEach(div => {
      Array.from(div.querySelectorAll('button'))
        .filter(btn => btn.textContent.trim() === "Click to see the message...")
        .forEach(btn => btn.remove()); // <--- removes the "Click to see the message..." button/text from the message container

      div.querySelectorAll('div.blur-sm')
        .forEach(childDiv => childDiv.classList.remove('blur-sm')); // <--- removes the blur from the messsage container
    });

    const shareButton = document.querySelector('button[aria-label="CHAI WEB | Share Button"]'); // <--- removes share button (some find it distracting, remove the line below to disable)
    if (shareButton) shareButton.remove();

    const flexContainers = document.querySelectorAll('div.flex.flex-col.h-\\[90svh\\].lg\\:h-\\[100vh\\]');
    flexContainers.forEach(container => {
      const targetChild = container.querySelector('div.relative.px-4.md\\:py-2');
      if (targetChild) targetChild.remove();
    });

    const elems = document.querySelectorAll('[class*="bg-black/50"]');
    elems.forEach(el => el.remove()); // <--- removes the annoying "Chat with {x} on CHAI App" popup
  });

  observer.observe(document.body, { childList: true, subtree: true }); // <--- observes the DOM for added or removed elements
})();