Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown copy fails with e is null #6

Open
akaihola opened this issue Jul 7, 2024 · 1 comment · May be fixed by #7
Open

Markdown copy fails with e is null #6

akaihola opened this issue Jul 7, 2024 · 1 comment · May be fixed by #7

Comments

@akaihola
Copy link

akaihola commented Jul 7, 2024

I did the following on Firefox:

I got the following error:

Uncaught TypeError: e is null    debugger eval code:1:1191
    exports debugger eval code:1
    <anonymous> debugger eval code:1
    <anonymous> debugger eval code:1
    <anonymous> debugger eval code:1
@akaihola
Copy link
Author

akaihola commented Jul 7, 2024

I un-minified md.min.js using unminify and ran that on the same chat. Now the error is:

Uncaught TypeError: e is null    debugger eval code:60:30
    exports debugger eval code:60
    <anonymous> debugger eval code:81
    <anonymous> debugger eval code:157
    <anonymous> debugger eval code:158

In the un-minified script, the mentioned lines with some context are:

    55	            361: (e) => {
    56	                e.exports = function () {
    57	                    var e = document.querySelector("div.flex-1.flex.flex-col.gap-3.px-4.pt-16"),
    58	                        t = document.querySelector("button[data-testid='chat-menu-trigger']"),
    59	                        n = t ? t.textContent : "";
**  60	                    return {
                                elements: e.querySelectorAll(
                                    "div.font-claude-message, div.font-user-message"
                                ),
                                title: n
                            };
    61	                };
    62	            },

(the word elements on line 60 starts in column 30)

    76	    (e = r(255)),
    77	        (t = r(380)),
    78	        (n = r(361)),
    79	        (function () {
    80	            var o = "",
**  81	                a = n(),
    82	                r = a.elements,
    83	                c = a.title,
    84	                i = t();
   153	                    f.nodeType === Node.TEXT_NODE && (o += "\n");
   154	                }
   155	            }
   156	            e(console, "md", c), console.save(o);
** 157	        })();
** 158	})();

(script ends on line 158)

@akaihola akaihola linked a pull request Jul 7, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant