+ return $this->getInlineHeadScripts() . "\n" . $this->getExternalHeadScripts();
+ }
+
+ /**
+ * <script src="..."> tags for "<head>". This is the startup module
+ * and other modules marked with position 'top'.
+ *
+ * @return string HTML fragment
+ */
+ function getExternalHeadScripts() {
+ $links = array();
+
+ // Startup - this provides the client with the module manifest and loads jquery and mediawiki base modules
+ $links[] = $this->makeResourceLoaderLink( 'startup', ResourceLoaderModule::TYPE_SCRIPTS );
+
+ return self::getHtmlFromLoaderLinks( $links );
+ }
+
+ /**
+ * <script>...</script> tags to put in "<head>".
+ *
+ * @return string HTML fragment
+ */
+ function getInlineHeadScripts() {