From Office 365 Support -
Sign in to Office 365 with your work or school account.
- Go to the SharePoint admin center.
- Select Settings.
- Under Custom Script, check if custom script is disabled.
If you cannot see the Custom Script option or the settings are already Allow, please let us know. It may reflect a different issue.
If the settings are Prevent, you may switch the option to Allow so as to bring the custom scripting feature back. However, we don’t recommend you do this as custom scripts and solutions may cause unexpected security risk and load to your sites.
If you prefer to turn scripting on, please be acknowledged of this consequences.
If you want to enable scripting on personal sites, select Allow users to run custom script on personal sites
If you want to enable scripting on other user-created sites, such as team sites or project sites, select Allow users to run custom script on self-service created sites.
- Select OK. It takes about 24 hours for the change to take effect.
http://community.office365.com/en-us/f/154/t/277832.aspx