MediaWiki:Gadget-ImageAnnotator.js: Difference between revisions

Content deleted Content added
m getElementsByClassName() used to return an array; so let's return the jQuery object: it's array-like enough (I hope)
m Make it really backwards-compatible
Line 3,193:
// Backwards compatibility
function getElementsByClassName (scope, tag, className) {
if (window.jQuery) {
return window.jQuery(scope).find(((!tag || tag === '*') ? '' : tag) + '.' + className);
} else {
// For non-WMF wikis that might not have jQuery (yet) let's work with the old version.
return window.getElementsByClassName (scope, tag, className);
}
}