External Publication
Visit Post

Web Compatibility Support • Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Pale Moon forum - Forum index [Unofficial] April 25, 2026
Source

The variable names got changed back to what they were before so the old version would probably have worked again but I have updated the code so that any further name changes should be caught. Here's the whole block again -

CODE:

// ==UserScript==// @name Google Script Rewriter// @namespace name// @include https://www.google.com/search*// @run-at document-start// @version 1// @grant none// ==/UserScript==(function() { var observer = new MutationObserver(mutations => { for (var m of mutations) { for (var node of m.addedNodes) { if (node.tagName === "SCRIPT" && node.textContent.includes("pipeThrough")) { // removes TextDecoderStream node.textContent = node.textContent.replace( ".pipeThrough(new TextDecoderStream)", "" ); //adds TextDecoder node.textContent = node.textContent.replace( "await a.B.read();", "await a.B.read();var dd = new TextDecoder().decode(d);d=dd;" ); //makes d a variable node.textContent = node.textContent.replace( "const {value:d", "var {value:d" ); //stop AI Overview section from being deleted node.textContent = node.textContent.replace( /for\(let\s+(\w+)\s*=\s*a\.firstChild;\s*\1\s*!==\s*(\w+);\s*\1\s*=\s*a\.firstChild\)\s*a\.removeChild\(\1\)/, "/*$&*/" ); // Replace the node so the modified version executes var clone = document.createElement("script"); clone.textContent = node.textContent; node.replaceWith(clone); } } } }); observer.observe(document.documentElement, { childList: true, subtree: true });})();

Discussion in the ATmosphere

Loading comments...