Adding script copy popover; fixing cross-domain issues