1
votes

I made several changes to sharepoint 'init.js' which located in folder:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\init.js

and i need to create deployment package which can replace existing init.js. How can i do this?

1

1 Answers

6
votes

Ouch! Bad mistake. You should never make changes to the OOB files! Undo and redo!

You should create your own JS file and have it overload the methods you need to modify. Overloading methods in JavaScript is easy; just make sure that your JS file is loaded after init.js (or the file you want to overload functions from) and create your own versions of the JS file using the same function name and signatures.