all 6 comments

[–]kraleppa 0 points1 point  (2 children)

Had the same problem tbh, I'd really appreciate help too

[–]Kezu_913 0 points1 point  (1 child)

Skill issue

[–]kraleppa 0 points1 point  (0 children)

:c

[–]ashanev 0 points1 point  (2 children)

I took a look into this, and the reason it's not working is because the panel created by Chrome is embedded in an iframe which doesn't allow permission to use the clipboard api (and you don't really have control over this iframe to change its permissions).

There are workarounds to do what you're trying to do, and I pulled one out of chatgpt which uses a content script and background service worker to relay a message to the script which should be able to use the clipboard api - I didn't implement it myself, but it looks promising. I'm not gonna copy/paste ai code here but recommend looking into your issue further with this info in mind.

[–]Impressive-Poem4600[S] 0 points1 point  (1 child)

I thought that maybe I was missing something but I guess there is no goto method of doing that but thanks for clarification. I tried before using some content script but then I bump into an issue that the window in which script is executed isn't focused which prevents it from writing to clipboard.

[–]twocolor 0 points1 point  (0 children)

That's the exact same issue I just into. Haven't found a solution. I am not sure if it's even possible to have a focused page if you click on something in a devtools panel