Spotify Web - Copy track info to clipboard

Adds an entry in the context menu that copies the selected song name and artist to the clipboard

< Feedback on Spotify Web - Copy track info to clipboard

Review: OK - script works, but has bugs

§
Posted: 06. 11. 2025
Edited: 06. 11. 2025

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?

§
Posted: 06. 11. 2025
Edited: 06. 11. 2025

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%.

cuziAuthor
§
Posted: 06. 11. 2025

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.

§
Posted: 07. 11. 2025
Edited: 07. 11. 2025

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"

cuziAuthor
§
Posted: 07. 11. 2025

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?

§
Posted: 07. 11. 2025

Yes only in PWA windows, album or playlist or search don't work. Bottom-left works in both normal web and PWA.

cuziAuthor
§
Posted: 14. 11. 2025

Sorry I have no clue why this happens and I don't have the time to really investigate this at the moment. It works for me both in normal Edge and PWA window, so I am not even sure how to investigate it.

§
Posted: 14. 11. 2025

ChatGPT says "Why extensions/scripts work on the bottom “Now Playing Bar” but NOT on the main page?
1. The bottom “Now Playing Bar” is a separate internal React view
2. The main content area is a separate SPA (Single Page App) that rerenders constantly"

And it gave a long explanation. Would this help?

§
Posted: 14. 12. 2025

Now its changed, it only doesn't work in my playlists. I can copy from artist pages and albums too now.

Post reply

Sign in to post a reply.