if (mw.config.get('wgNamespaceNumber') >= 0) {
var highlightRedirects = {
run : function()
{
var redir_style = window.redir_style || 'color:#338800',
redir_vis_style = window.redir_vis_style || 'color:#338899';
if (!window.HighlightredirectsAll)
{
mw.util.addCSS('body *:not(.infobox) .navbox a.mw-redirect, body *:not(.infobox) .NavFrame a.mw-redirect { ' + redir_style + '}');
mw.util.addCSS('body *:not(.infobox) .navbox a.mw-redirect:visited, body *:not(.infobox) .NavFrame a.mw-redirect:visited { '+ redir_vis_style+ '}');
} else {
mw.util.addCSS('a.mw-redirect { ' + redir_style + '}');
mw.util.addCSS('a.mw-redirect:visited { '+ redir_vis_style+ '}');
}
},
install : function()
{
with (highlightRedirects)
{
if (window.tab_redir) {
mw.util.addPortletLink('p-cactions', 'javascript:highlightRedirects.run();', 'redirects') ||
mw.util.addPortletLink('views', 'javascript:highlightRedirects.run();', 'redirects');
} else {
highlightRedirects.run();
}
}
}
};
//
// Hook up installation function
//
mw.hook( 'wikipage.content' ).add( highlightRedirects.install );
}