Wikipedia:Visualizing redirects
Appearance
From Wikipedia, the free encyclopedia
There are several options for making links that are redirects have a different color than normal links.
Using a stylesheet
[edit source ]You can add this to your common.css:
.mw-redirect{ color:green; } .mw-redirect:visited{ color:green; } .mw-redirect:hover{ color:green; } .mw-redirect:active{ color:green; }
Using JavaScript
[edit source ]You can also use a userscript to get the same effect, commonly used ones are:
- User:Anomie/linkclassifier
- User:BrandonXLF/GreenRedirects, a script that turns redirects green
- User:Nihiltres/assesslinks.js, allows you to see the assessment of every article linked from a given page and turns redirects magenta
Yet another alternative is this script which you can place in your common.js. It adds a 'redirects" tab which turns all redirects green whenever you want:
Code
if(mw.config.get('wgAction')!='edit'&&mw.config.get('wgCanonicalNamespace')!='Special'){ varhighlightRedirects={ tab_redirects:null, addStylesheetRule:function(tag,style){ varss=document.styleSheets[0]; if(ss.insertRule){ ss.insertRule(tag+'{'+style+'}',ss.cssRules.length); }elseif(ss.addRule){ ss.addRule(tag,style); } }, run:function(){ highlightRedirects.addStylesheetRule('a.mw-redirect','color:green'); }, install:function(){ with(highlightRedirects) { tab_redirects=addPortletLink('p-cactions','javascript:highlightRedirects.run();','redirects'); if(document.getElementById('ca-history')) document.getElementById('ca-history').parentNode.appendChild(tab_redirects); } } }; addOnloadHook(highlightRedirects.install); }