ChatGPT Remove In-Text Citations

Hide and remove In-Text Citations from all ChatGPT responses.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         ChatGPT Remove In-Text Citations
// @namespace    https://chatgpt.com/
// @version      1.0
// @description  Hide and remove In-Text Citations from all ChatGPT responses.
// @author       groundcat
// @match        https://chatgpt.com/*
// @icon         https://chatgpt.com/favicon.ico
// @grant        none
// @license MIT
// ==/UserScript==

(function () {
  'use strict';

  /* Quick removal via CSS — avoids layout flashes */
  const style = document.createElement('style');
  style.textContent = `
    /* Hide any element that contains BOTH classes */
    .text-token-text-secondary.inline-flex {
      display: none !important;
    }
  `;
  document.head.appendChild(style);

  /* Defensive clean‑up — catches elements injected after page load */
  function scrub(root = document) {
    root.querySelectorAll('.text-token-text-secondary.inline-flex').forEach((node) => node.remove());
  }

  // Initial pass for anything already on screen
  scrub();

  // Observe DOM mutations so we stay ahead of streaming messages or edits
  const observer = new MutationObserver((mutations) => {
    for (const m of mutations) {
      m.addedNodes.forEach((n) => {
        if (n.nodeType === 1) {
          // Only process element nodes
          scrub(n);
        }
      });
    }
  });

  observer.observe(document.body, { childList: true, subtree: true });
})();