replace "console.log" by "if(console)console.log"