您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Finds polygon elements whose points start with "242.424,90.909", locates the closest span ancestor with class "rounded-md", then hides the grandparent of that span (two levels up) by setting display: none !important
// ==UserScript== // @name mistral Hide Specific Ancestor on Mistral Chat // @description Finds polygon elements whose points start with "242.424,90.909", locates the closest span ancestor with class "rounded-md", then hides the grandparent of that span (two levels up) by setting display: none !important // @match https://chat.mistral.ai/* // @run-at document-idle // @version 0.0.1.20250621071922 // @namespace https://gf.qytechs.cn/users/1435046 // ==/UserScript== (function() { function hideMatchingAncestors() { // Select all <polygon> elements with points starting "242.424,90.909" const polygons = document.querySelectorAll('polygon[points^="242.424,90.909"]'); polygons.forEach(polygon => { // Find the nearest <span> ancestor const span = polygon.closest('span'); // If that span has class "rounded-md" if (span && span.classList.contains('rounded-md')) { // Climb two levels up from the span: span → parent → grandparent const grandparent = span.parentElement && span.parentElement.parentElement; if (grandparent) { // Hide that grandparent element grandparent.style.setProperty('display', 'none', 'important'); } } }); } // Run once on initial page load hideMatchingAncestors(); // Observe DOM changes to catch newly added polygons const observer = new MutationObserver(hideMatchingAncestors); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址