On Torrentz2, the magnet icon does not appear next to the inserted link (see below). Otherwise, the script works as intended, thank you for providing it. In truth, the missing icon is a minor issue at most, but you should still be made aware.
I would think this has something to do with reworked HTML element selectors; however, I'm not good with selections from the DOM, and this is just a guess.
Chrome's script console also provides a possibly-relevant error when the page loads. It occurs at position 63:7 in the script.
Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-jcfIVO/5j1k051VfHT7NAirBLgKDkU/zYdbqyhuCecE='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.
I am not sure what to make of that, but I hope it helps!