您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Completely disable LaTeX rendering (MathJax, KaTeX, etc.)
当前为
// ==UserScript== // @name Disable LaTeX Rendering Completely3 // @namespace http://tampermonkey.net/ // @version 0.3 // @description Completely disable LaTeX rendering (MathJax, KaTeX, etc.) // @author You // @match *://*/* // @grant none // ==/UserScript== (function() { 'use strict'; // Function to disable LaTeX rendering (remove MathJax, KaTeX scripts, and prevent any rendering) function disableLatexRendering() { // Remove any LaTeX rendering scripts like MathJax or KaTeX const scripts = document.querySelectorAll('script[src*="mathjax"], script[src*="katex"], script[type="math/tex"]'); scripts.forEach(script => script.remove()); // Remove elements that might be rendering LaTeX as images or HTML const latexElements = document.querySelectorAll('span, div, p, img'); latexElements.forEach(element => { if (element.innerHTML && element.innerHTML.match(/(?:\\\[.*\\\]|\\\(.*\\\))/)) { // If the element contains LaTeX, change its inner HTML to raw LaTeX code element.innerHTML = element.innerText; } }); // Make sure no LaTeX is being auto-rendered by MathJax/KaTeX const mathJaxVars = ['MathJax', 'katex']; mathJaxVars.forEach(varName => { if (window[varName]) { window[varName] = undefined; } }); } // Run the function when the document is fully loaded window.addEventListener('load', function() { disableLatexRendering(); }); // Also run the function periodically to handle dynamic content (e.g., AJAX updates) setInterval(disableLatexRendering, 1000); })();