Tim Ferro on GitHub (vball525)
JSOM to the rescue! After a bit of searching around the Internet, I found a couple of great references: here and here. They were so close but I needed to do a little tweaking to get it just right. I just wanted ONE single file that does everything for me. When a simple, single file solution didn’t exist, I created one (mostly from the previous references) and posted it to my GitHub account here! *Note I could not find a way to get CSS with HTC references working (example here). Please let me know if you can and how.
Step 3: Create a new page. Call it anything you wish, as you will delete this after one use. I called mine “RegisterScript”.
Step 5: Save the page, refresh the page, and make sure there are no errors.
Step 6: Uncomment the lines you commented out earlier and in a different tab reupload to the Site Assets library.
Step 7: Refresh the RegisterScript page again. You should see a success pop up!
Step 8: DO NOT REFRESH THE PAGE. Click ok. Close that tab. Do not save anything. From the other tab you have open, click the link for Site Contents. Navigate to the document library where your new page is and DELETE IT. If it is successful, you only need to run this one time.
I hope this is easy, simple, and helps. Please leave comments or feedback so that it can help others.
– Tim Ferro