ChatGPT Remove In-Text Citations

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

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

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