Fk chai limits

Αυτός ο κώδικας δεν πρέπει να εγκατασταθεί άμεσα. Είναι μια βιβλιοθήκη για άλλους κώδικες που περιλαμβάνεται μέσω της οδηγίας meta // @require https://update.greatest.deepsurf.us/scripts/571951/1787236/Fk%20chai%20limits.js

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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
})();