To print a GROK chat, paste this code in javascript console:
(function() {
var a = document.querySelector("body > div > div").children[0].children[1].children[0];
if (a) {
const b = window.open("", "_blank", `width=${.85 * window.screen.width},height=${.85 * window.screen.height},left=${.075 * window.screen.width},top=${.045 * window.screen.height}`)
, e = Array.from(document.styleSheets).map(c => {
try {
return Array.from(c.cssRules).map(d => d.cssText).join("\n")
} catch (d) {
return console.error("Error occurred while getting stylesheet rules", d),
""
}
}
).join("\n");
b.document.write("<html><head><title>Grok_" + (new Date).getTime() + "</title>");
b.document.write("<style>" + e + "</style>");
b.document.write("</head><body>");
b.document.write(a.innerHTML);
b.document.write("</body></html>");
setTimeout(b.print.bind(b), 3E3)
} else
console.error("Central part not found!")
}
)()
Alternatively, save a bookmark called "Print Grok" with the following code:
javascript:(function(){var a=document.querySelector("body > div > div").children[0].children[1].children[0];if(a){const b=window.open("","_blank",`width=${.85*window.screen.width},height=${.85*window.screen.height},left=${.075*window.screen.width},top=${.045*window.screen.height}`),e=Array.from(document.styleSheets).map(c=>{try{return Array.from(c.cssRules).map(d=>d.cssText).join("\n")}catch(d){return console.error("Error occurred while getting stylesheet rules",d),""}}).join("\n");b.document.write("<html><head><title>Grok_"+(new Date).getTime()+"</title>"),b.document.write("<style>"+e+"</style>"),b.document.write("</head><body>"),b.document.write(a.innerHTML),b.document.write("</body></html>"),setTimeout(b.print.bind(b),3E3)}else console.error("Central part not found!")})()
Enjoy.
Note: If you want also the thinking to be printed, click on the thinking box before executing the bookmarklet (or the function).
To print a GROK chat, paste this code in javascript console:
Alternatively, save a bookmark called "Print Grok" with the following code:
Enjoy.
Note:
If you want also the thinking to be printed, click on the thinking box before executing the bookmarklet (or the function).