When refactoring you have to search your code base to see what areas may be impacted by a changing api. Code that is maintained in .js files and checked into source control can easily be searched.

SharePoint, however, allows Script Editor web parts to be added to any page. How would one search code found in these web parts?

I am aware that on a given page I can check its contents via ?contents=1 but what I need is a way of locating/searching code found on any page within a large site collection.

If I can't search the code directly it would sufficient to simply know what pages have Script Editor web parts.

Due to a separation of responsibilities our team doesn't have direct access to the server (Central Admin and PowerShell) so it would be preferable to use some other means available on the front end, but all options are welcome.

I can query rest apis. Maybe there's an api that provides a list of web parts appearing on different pages?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.