Anti-Blur for Grok AI's Image Generator

Removes any blurring from Grok's AI when generating an image. More precisely, it permanently removes all instances of "filter: blur(70px) contrast(2);" applied to page elements.

当前为 2025-07-22 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Anti-Blur for Grok AI's Image Generator
// @namespace   Violentmonkey Scripts
// @match       https://grok.com/
// @license     MIT License
// @grant       none
// @version     1.0
// @author      AntoineGenvintroy
// @description Removes any blurring from Grok's AI when generating an image. More precisely, it permanently removes all instances of "filter: blur(70px) contrast(2);" applied to page elements.
// @icon        https://www.google.com/s2/favicons?domain=grok.com
// ==/UserScript==

// Function to clean an element of this specific filter
function removeSpecificFilter(el) {
  const computed = window.getComputedStyle(el);
  if (computed.filter === 'blur(70px) contrast(2)') {
    el.style.filter = 'none';
  }
  // Sometimes the filter is defined inline (in style), so we can also remove it directly if detected
  if (el.style && el.style.filter === 'blur(70px) contrast(2)') {
    el.style.filter = 'none';
  }
}

// Recursive function to process the entire DOM
function cleanAllElements() {
  document.querySelectorAll('*').forEach(removeSpecificFilter);
}

// Observe changes in the DOM
const observer = new MutationObserver((mutations) => {
  for (const mutation of mutations) {
    if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
      removeSpecificFilter(mutation.target);
    }
    if (mutation.type === 'childList') {
      mutation.addedNodes.forEach(node => {
        if (node.nodeType === 1) { // élément HTML
          removeSpecificFilter(node);
          node.querySelectorAll('*').forEach(removeSpecificFilter);
        }
      });
    }
  }
});

// Observation options
observer.observe(document.documentElement, {
  attributes: true,
  subtree: true,
  childList: true,
  attributeFilter: ['style']
});

// Initial cleaning
cleanAllElements();

// Optional: cleaning every 500ms in addition to observing it (reinforcement)
setInterval(cleanAllElements, 500);