Topic on Talk:JQuery

Jump to navigation Jump to search

How to disable load /resources/jquery/jquery.js in mediawiki1.17?

Peachey88 (talkcontribs)

I'd like use google jquery instead of mediawiki's jquery. that will make site load faster.

Krinkle (talkcontribs)

MediaWiki 1.17 comes with ResourceLoader which loads jQuery minified and combined with other files in one request. The gain of loading it from a CDN is minimal at best in this case. Not supported in core.

Netsu (talkcontribs)


$wgHooks['SkinAfterBottomScripts'][] = 'fnRemoveAnnoingJS';

function fnRemoveAnnoingJS($skin, &$text) {

  $n = "\n";
  $t = "\t";
  $text = $text.'<script language="JavaScript" type="text/javascript">


  '<script type="text/javascript" src="/fileYouWantToWorkWithoutStupidBuggy.1.4.2.js"></script>';

  return true;


$wgHooks['ParserBeforeTidy'][] = 'wgAddJquery';

function wgAddJquery(&$parser, &$text) {

  global $addJqueryScripts;
  if ($addJqueryScripts === true) return true;

    '<script language="JavaScript" src="" type="text/javascript"></script>'

  $addJqueryScripts = true;

  return true;

} (talkcontribs)

JQuery is not loaded by Mediawiki 1.19 and above. Nothing seems to work and there is no documentation on how to make it work.

How and where is jQuery actuially loaded?

Reply to "How to disable load /resources/jquery/jquery.js in mediawiki1.17?"