在上下文菜單中添加一個條目,該條目將選定的歌曲名稱和歌手複製到剪貼板
Chatgpt gave an explanation and wrote "document.addEventListener('click', function(e) {
if (e.target.closest('[data-testid="tracklist-row"]')) {
// manual fallback
}
});" this code might fix it, but also said because injection in PWA is weak, so it won't work 100%.
It actually seems to work for me as is.
You can try to look in the console for messages/errors, press CTRL + SHIFT + i and then go to the "Console" tab. Press the clear 🚫 button and the try to copy the song from an album/playlist. Something new should appear in the console.
Ctrl Shift i didn't work on Edge, so I launched Inspect with F12. Clicking on "Clear console" button didn't fix it. I restarted it and I still got these errors
"Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
Unchecked runtime.lastError: The message port closed before a response was received.
Tracking Prevention blocked access to storage for .
Blocked script execution in 'about:blank' because the document's frame is sandboxed and the 'allow-scripts' permission is not set
[Intervention] Images loaded lazily and replaced with placeholders. Load events are deferred. See"
Those errors are from something else, they aren't related to this script.
And the script works on album/playlist pages in normal Edge for you? It's only in PWA windows where it doesn't work?
Yes only in PWA windows, album or playlist or search don't work. Bottom-left works in both normal web and PWA.
In PWA window of Edge, copying the song that plays from bottom-left works, but there is no copying option when I right click on a song from an album or playlist or search. I thought most extensions don't work in PWA window but copying from a song that plays works, why doesn't it work in another way?