Clean custom script for popup