Content deleted Content added
r |
Fix a bug that occurs on edit pages that don't have previews, such as protected images. |
||
Line 99:
if (mw.config.get('wgCanonicalNamespace') == '' || mw.config.get('wgCanonicalNamespace') == 'MediaWiki' || mw.config.get('wgCanonicalNamespace') == 'Special' || mw.config.get('wgAction') == 'history') return false;
var topContainer;
if ($('#wikiPreview').length) topContainer = $('#wikiPreview');
else if ($('#mw-content-text').length && mw.config.get('wgAction') == 'view') topContainer = $('#mw-content-text');
else if ($('#bodyContent').length && mw.config.get('wgAction') == 'view') topContainer = $('#bodyContent');
else topContainer = false;
if (topContainer && topContainer.length) replaceText(topContainer, /(\d\d):(\d\d), (\d{1,2}) ([A-Z][a-z]+) (\d{4}) \(UTC\)/);
}
|