Greasy Fork is available in English.

ChatGPT Copy as Markdown with MathJax Support

Copy the chatGPT Q&A content as a markdown text, with MathJax Render Support, you can use this together with 'OpenAI-ChatGPT LaTeX Auto Render (with MathJax V2)' that adds support for math render, based on 'chatGPT Markdown' by 赵巍໖.

< Feedback on ChatGPT Copy as Markdown with MathJax Support

Question/comment

§
Posted: 15-12-2022

支持数学公式的ChatGPT Markdown一键复制.user.js:242

Uncaught TypeError: Cannot read properties of undefined (reading 'nodeName')
at 支持数学公式的ChatGPT Markdown一键复制.user.js:242:43
at Array.forEach ()
at MutationObserver. (支持数学公式的ChatGPT Markdown一键复制.user.js:239:19)


这个错误令我苦恼,如果有任何解决方法的话,请通知我,谢谢

jbjiAuthor
§
Posted: 15-12-2022

Thanks for your feedback!

This is because the case where mutation.addedNodes[0] is undefined was not handled. I've added an if condition in update 0.4.2 that checks whether mutation.addedNodes[0] exists, this should help.

The code snippet related to this problem is a mutation observer that handles 'headlessui-portal-root', which had worked properly but not elegantly due to this bug.

By the way, I'm seeking for a better way to insert the copy button instead of setting a timeout(which could be invalid in some case but not often), please let me know if you have got a better solution!

§
Posted: 24-02-2023

确实没有复制按钮,你可以考虑把Upgrade to Plus按钮更换一下

Post reply

Sign in to post a reply.