Closed cyfung1031 closed 1 year ago
It is necessary on Spotify, because the Spotify page overwrites setTimeout
and the other functions. This is a way to get the built-in functions back. I don't know if there is a simpler way to do it, but this works.
It is necessary on Spotify, because the Spotify page overwrites
setTimeout
and the other functions. This is a way to get the built-in functions back. I don't know if there is a simpler way to do it, but this works.
Understand, but why you cannot use the modified setTimeout? I checked that its implementation is the same as the native. Perhaps Spotify just want to do some logging.
I have not checked it since I added that. Maybe it has changed. At the time, their implementation was really slow, because it send and waited for a request to the Spotify server before running.
I have not checked it since I added that. Maybe it has changed. At the time, their implementation was really slow, because it send and waited for a request to the Spotify server before running.
I have figured out that Spotify uses two different implementations of setTimeout.
First is a fake window object and fake setTimeout / setInterval.
Second one can work as normal although it is modified.
I cannot notify any declaration of
setTimeout
,setInterval
,clearTimeout
, andclearInterval
in the script. What is the purpose of these coding?