Tidy up embed JS for same domain