replace embedded js with link