Closed HDark15 closed 5 months ago
I will check on the weekend
Happens only with Violentmonkey, Tampermonkey still works. It should be possible to fix it for Violentmonkey.
Same issue here with Firefox and Violentmonkey. Switching to Tampermonkey 'til fixed. <3
Can produce on my side. I will help to fix this issue.
The root cause is that there is a commit in Apr 20, 2024 which added @grant unsafeWindow
in the script.
This would change the window
variable. The original method binding was incorrect.
Now issue should be fixed.
Oh right, that is not supposed to be there. I tried using unsafeWindow to access the Spotify javascript to close the "Now Playing"-view, but that didn't work reliably. I'll remove it.
I am getting
TypeError: 'setTimeout' called on an object that does not implement interface Window.
in Violentmonkey with Firefox
Here: https://github.com/cvzi/genius-lyrics-userscript/blob/5bb8bd13c4a407b06810cbf9003f31cb5cc43ec3/GeniusLyrics.js#L124 and here: https://github.com/cvzi/genius-lyrics-userscript/blob/5bb8bd13c4a407b06810cbf9003f31cb5cc43ec3/GeniusLyrics.js#L4939
@cvzi
Previously, you faced the issue that setTimeout/setInterval is modified by Spotify and the timer could not work, so you tried to add the code to obtain the native setTimeout/setInterval.
Now, the issue become the environment is already isolated so the obtaining native method is no longer required.
I will PR the changes required to omit unsafeWindow and make sure it is isolated from the page context. (both VM & TM)
Firefox with Violentmonkey, not working only on Spotify. This is the error when it active
The button not show up and this is the error when clicking "Show lyrics"
It stuck on loading, I can open settings and search