chatgpt Set GPT Feedback Display

Watch for the “Is this conversation helpful so far?” or “Do you like this personality?” element and set its CSS display property

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         chatgpt Set GPT Feedback Display
// @description  Watch for the “Is this conversation helpful so far?” or “Do you like this personality?” element and set its CSS display property
// @match        https://chatgpt.com/*
// @run-at       document-idle
// @version 0.0.1.20250624100349
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function() {
  const observer = new MutationObserver(mutations => {
    for (const mutation of mutations) {
      for (const node of mutation.addedNodes) {
        if (node.nodeType === 1) {
          const walker = document.createTreeWalker(node, NodeFilter.SHOW_TEXT);
          let textNode;
          while ((textNode = walker.nextNode())) {
            const text = textNode.textContent.trim();
            if (
              text.includes("Is this conversation helpful so far?") ||
              text.includes("Do you like this personality?")
            ) {
              textNode.parentElement.style.setProperty("display", "unset", "important");
              observer.disconnect();
              return;
            }
          }
        }
      }
    }
  });

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