MediaWiki:Gadget-morebits.js: Difference between revisions

Content deleted Content added
Repo at f27c7b2: Make unitMap available through Morebits.date.unitMap
Repo at 65433ca: Fixes after renaming of {{Rfd}} and Module:RfD
Line 114:
* Determines whether the current page is a redirect or soft redirect. Fails
* to detect soft redirects on edit, history, etc. pages. Will attempt to
* detect [[Module:RfDRedirect for discussion]], with the same failure points.
*
* @returns {boolean}
*/
Morebits.isPageRedirect = function() {
return !!(mw.config.get('wgIsRedirect') || document.getElementById('softredirect') || $('.box-RfDRedirect_for_discussion').length);
};