Spotify Web - 複製歌曲信息

在上下文菜單中添加一個條目,該條目將選定的歌曲名稱和歌手複製到剪貼板

< 腳本Spotify Web - 複製歌曲信息的回應

評論:普通 - 腳本能使用,但有一些問題

§
發表於:2025-11-06
編輯:2025-11-06

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?

§
發表於:2025-11-06
編輯:2025-11-06

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

cuzi作者
§
發表於:2025-11-06

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.

§
發表於:2025-11-07
編輯:2025-11-07

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"

cuzi作者
§
發表於:2025-11-07

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?

§
發表於:2025-11-07

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

發表回覆

登入以回覆