The code is from _forgeuser1192743 that they used to make the original addon TargetofTarget Tooltip, I simply tweaked it so it would work for Midnight as me and one of my friends wanted to use it.
Displays the target of any unit/player directly in the tooltip when you hover over them.
The tooltip updates automatically if their target changes, so you don’t need to move your cursor to refresh it. If a player is targeting you, it will display "YOU".
Due to recent API changes, it can no longer interact with NPCs in order to remain active.

