Apply CSS when executing JavaScript and provide a close to normal environment