FYI, I removed the PHP tag since the question/issue is 100% about JS. And tbh, why does it really matter if there are some extra script tags in the source? Adding code to remove them after the functions been called will just add unnecessary complexity (and will most likely make it much harder to debug since the code you need to check might have been removed.) Always thrive for simplicity.
– M. ErikssonJun 04 '22 at 09:17
Basically I wrote myself a popup and roast-notifications system, and I know it most likely not professional, but php generating the code adds them as function calls with parameters, and i didnt like having a like row of 60
– nimoJun 05 '22 at 20:04