how can I remove my appended script because it causes some problems in my app.
This is my code to get my script
var nowDate = new Date().getTime(); v
I would simply check to see if you've already added the script. Adding it and then removing is adds unnecessary complexity. Something like this should work:
var scriptAdded = false; if(scriptAdded == false) { document.body.appendChild(script); scriptAdded = true; }