$tpl->set( 'indicators', $out->getIndicators() );
$tpl->set( 'sitenotice', $this->getSiteNotice() );
- $tpl->set( 'bottomscripts', $this->bottomScripts() );
$tpl->set( 'printfooter', $this->printSource() );
// Wrap the bodyText with #mw-content-text element
$out->mBodytext = $this->wrapHTML( $title, $out->mBodytext );
$tpl->set( 'sidebar', $this->buildSidebar() );
$tpl->set( 'nav_urls', $this->buildNavUrls() );
+ // Do this last in case hooks above add bottom scripts
+ $tpl->set( 'bottomscripts', $this->bottomScripts() );
+
// Set the head scripts near the end, in case the above actions resulted in added scripts
$tpl->set( 'headelement', $out->headElement( $this ) );