您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
מסתיר הודעות ישנות בצ'אט של GPT ב־#thread article, עם כפתור הצג הכול
// ==UserScript== // @name ChatGPT - Hide Old Messages (New DOM) // @namespace https://openai.com/ // @version 1.2 // @description מסתיר הודעות ישנות בצ'אט של GPT ב־#thread article, עם כפתור הצג הכול // @author Ross M // @license MIT // @match https://chatgpt.com/* // @grant none // ==/UserScript== (function () { 'use strict'; const MAX_VISIBLE_MESSAGES = 10; function createShowAllButton(messages) { console.log("✅ button Tampermonkey נטען"); const existing = document.getElementById("showAllMessagesBtn"); if (existing) return; const btn = document.createElement("button"); btn.textContent = "הצג את כל ההודעות"; btn.id = "showAllMessagesBtn"; Object.assign(btn.style, { position: "fixed", top: "50px", right: "10px", zIndex: 9999, padding: "10px", backgroundColor: "#10a37f", color: "#fff", border: "none", borderRadius: "5px", cursor: "pointer", fontSize: "14px" }); btn.onclick = () => { messages.forEach(msg => msg.style.display = ""); btn.remove(); }; document.body.appendChild(btn); } function hideOldMessages() { const messages = Array.from(document.querySelectorAll("#thread article")); if (messages.length > MAX_VISIBLE_MESSAGES) { messages.forEach((msg, idx) => { msg.style.display = (idx < messages.length - MAX_VISIBLE_MESSAGES) ? "none" : ""; }); createShowAllButton(messages); } } const observer = new MutationObserver(hideOldMessages); function waitForThread() { const container = document.querySelector("#thread"); if (container) { observer.observe(container, { childList: true, subtree: true }); hideOldMessages(); } else { setTimeout(waitForThread, 500); } } waitForThread(); })();