remove ff postmessage and fix cross origin issue on chrome