Instead of copying and pasting scripts into the Content Editor web part, you should enter the code to a file and store the file in a SharePoint library, then link this file to the Content Editor web part.
You can refer to this blog for more information. It has good information though it is for SP 2010.