This script has been obsoleted by T165189, which implemented the functionality of this script in MediaWiki itself.
Historically, this script took section headers and made them link to the sections when they appeared in histories (like page histories, watchlists, user contribs pages, diffs).
The source code can be found at the history of User:Enterprisey/link-section-edits.js.