You modify LocalSettings.php which creates a derivation of MediaWiki, or as the GPL puts it, "thus forming a work based on the Program". At this point you don't have to share the changes.
However, once you distribute the JavaScript files:
"You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License [...] These requirements apply to the modified work as a whole."
By modifying LocalSettings.php you have created a derivation. By redistributing the JavaScript files you have distributed part of the work and therefore must make the whole derived work available under the GPL.
However, once you distribute the JavaScript files:
"You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License [...] These requirements apply to the modified work as a whole."
By modifying LocalSettings.php you have created a derivation. By redistributing the JavaScript files you have distributed part of the work and therefore must make the whole derived work available under the GPL.