Last modified: 2010-09-13 18:05:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27150, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25150 - Resource loader doesn't define $j as an alias for jQuery
Resource loader doesn't define $j as an alias for jQuery
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.17.x
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-12 10:00 UTC by Max Semenik
Modified: 2010-09-13 18:05 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Max Semenik 2010-09-12 10:00:27 UTC
Seen on TWN, for example at http://translatewiki.net/w/i.php?title=MediaWiki:Config-invalid-ts2schema/ru&curid=1615639&diff=2317155&oldid=2316770

Context:

addOnloadHook(createNavigationBarToggleButton);$j(document).ready(function(){$j(".mw-usertoollinks").each(function(){var tools=$j(this);var expander=$j("<a/>").text("+").attr("href","#");tools.hide();expander.click(function(){tools.show();$j(this).hide();});tools.before(expander);});});$j(document).ready(function(){if(wgUserGroups.indexOf('translator')!==-1)$j('#n-bw-sidebar-intro').hide();});function addLiLink(tabs,url,name,id,title,key){var na=document.createElement('a');na.href=url;na.appendChild(document.createTextNode(name));var li=document.createElement('li');if(id){li.id=id;}
Comment 1 Trevor Parscal 2010-09-13 18:05:59 UTC
Fixed in r72918 by adding an alias at the end of wikibits.js. Note: this is only to get site/user scripts that were using $j to work. Use of $j should be phased out in favor of $. If you are writing a library that's intended for re-use, please wrap it in a closure that passes jQuery as $ such as "( function( $ ) { /* code here */ } )( jQuery );" so that people using alternative short names for jQuery can use the code unmodified.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links