MediaWiki:LAPI.js: Difference between revisions
Content deleted Content added
Update to latest version from Commons |
Update to latest version from Commons |
||
Line 24:
*/
// Global: wgServer, wgScript, wgUserLanguage
// Global: importScript (from wiki.js, for MediaWiki:AjaxSubmit.js)
Line 1,086:
if (!file_hist) return result;
try {
var $file_curr =
// Did they change the column order here? It once was nextSibling.nextSibling... but somehow
// the thumbnails seem to be gone... Right:
// http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/ImagePage.php?r1=52385&r2=53130
file_hist = LAPI.DOM.getInnerText ($file_curr[0].nextSibling);
if (!file_hist.contains ('×')) {
file_hist = LAPI.DOM.getInnerText ($file_curr[0].nextSibling.nextSibling);
if (!file_hist.contains ('×')) file_hist = null;
}
Line 1,555:
}; // end LAPI.Ajax.parseWikitext
// Throbber backward-compatibility
LAPI.Ajax.injectSpinner = injectSpinner;▼
LAPI.Ajax.removeSpinner = removeSpinner;▼
LAPI.Ajax.injectSpinner = function (elementBefore, id) {}; // No-op, replaced as appropriate below.
LAPI.Ajax.removeSpinner = function (id) {}; // No-op, replaced as appropriate below.
if (typeof window.jQuery == 'undefined' || typeof window.mediaWiki == 'undefined' || typeof window.mediaWiki.loader == 'undefined') {
// Assume old-stlye
if (typeof window.injectSpinner != 'undefined') {
▲ LAPI.Ajax.injectSpinner = window.injectSpinner;
}
if (typeof window.removeSpinner != 'undefined') {
▲ LAPI.Ajax.removeSpinner = window.removeSpinner;
}
} else {
window.mediaWiki.loader.using('jquery.spinner', function () {
LAPI.Ajax.injectSpinner = function (elementBefore, id) {
window.jQuery(elementBefore).injectSpinner(id);
}
LAPI.Ajax.removeSpinner = function (id) {
window.jQuery.removeSpinner(id);
}
});
}
} // end if (guard)
|