This project has moved and is read-only. For the latest updates, please go here.

SPScriptAudit Observation and Request

Jan 16, 2014 at 9:38 PM
I've had occassion recently to put the SPScriptAudit to work in a new position I'm assigned to....trying to get a handle on the current environment I'm taking over. I noticed a couple things that I thought you might like to know about:

I'm using SPServices v0.7.1a so if these have already been addressed in later version, my apologies.
  • The webURL must be within the current site collection if you choose to use that argument. That may be a good add in the Docs section.
  • When specifying a webURL within the current site collection that is not the current site and showSrc = true, the script reference column is creating an invalid URL in the anchor tag, i.e. thisSrcPath = "/sites/1472/pages/"
....And a request for future enhancement. The current rule is to only seek out .aspx files within the designated pages library. Would there be a problem extending that to .htm and .html files? (such as...
if(thisPageUrl.indexOf(".aspx") > 0 || thisPageUrl.indexOf(".htm") > 0) {
    SPScriptAuditPage(opt, listXml, "Page", thisPageType, SLASH + thisPageUrl);