支持数学公式的ChatGPT Markdown一键复制

将chatGPT问答内容复制成markdown文本,并支持MathJax渲染内容导出,与'OpenAI-ChatGPT LaTeX Auto Render(with MathJax V2)'一起使用可以渲染公式, 基于赵巍໖的'chatGPT Markdown'。

< 脚本支持数学公式的ChatGPT Markdown一键复制的反馈

提问/评论

§
发表于:2022-12-15

支持数学公式的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)


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

jbji作者
§
发表于:2022-12-15

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!

§
发表于:2023-02-24

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

发表回复

登录以发表回复。