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.

作者
Antoine Genvintroy
今日安裝
0
安裝總數
6
評價
0 0 0
版本
1.0
建立日期
2025-07-22
更新日期
2025-07-22
尺寸
2.2 KB
授權條款
MIT
腳本執行於


(May not work yet, still updating) This userscript is designed to continuously remove the CSS filter style
filter: blur(70px) contrast(2); from all elements on a webpage.


At the core of the script is a function called removeSpecificFilter,
which checks each element's computed style to see if the filter property matches
the unwanted value blur(70px) contrast(2). If a match is found, it sets the element's
inline style.filter property to 'none', effectively canceling out the blur and
contrast manipulation. It also checks the inline style directly in case the filter was applied
explicitly via a style attribute rather than CSS rulesheets.


To apply this cleaning logic to the entire page, the cleanAllElements function runs
through all elements in the document using document.querySelectorAll('*'), applying the
removeSpecificFilter function to each one. This covers any filters that are already
present when the script is first executed.


To ensure the effect is persistent, the script uses a MutationObserver. This observer
watches for changes in the DOM, such as new elements being added or changes to an element’s
style attribute. Whenever such changes occur, the observer re-applies the filter-cleaning
logic to the affected elements and their children. This guarantees that any dynamic content or
scripts that attempt to reapply the blur will be counteracted immediately.


As an extra layer of reliability, the script also runs a setInterval every 500 milliseconds
to re-scan and clean all elements. While the MutationObserver should cover most cases, the
interval serves as a failsafe for edge cases, ensuring no blurred content is left behind due to
missed mutations or timing issues.

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址