Ajuda:Página de testes: diferenças entre revisões

Origem: Wikipédia, a enciclopédia livre.
Conteúdo apagado Conteúdo adicionado
m =/
m agora sim!
Linha 7: Linha 7:


// Don't load on edit or special pages & don't load twice
// Don't load on edit or special pages & don't load twice
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit', 'purge']) !== -1 && mw.config.get('wgCanonicalNamespace') !== 'Special' && typeof highlightRedirects == 'undefined') {
if ($.inArray(mw.config.get('wgAction'), ['view', 'submit', 'purge']) !== -1 && mw.config.get('wgCanonicalNamespace') !== 'Special' && typeof highlightRedirects === 'undefined') {


window.highlightRedirects = {
window.highlightRedirects = {

Revisão das 14h31min de 27 de fevereiro de 2011

/** Redirecionamentos

* Permite saber se num artigo existem ligações para redirecionamentos destacando-as com a cor verde.
* @source: en:User:Dschwen/highlightredirects.js
* @see: Wikipedia:Software/Scripts/Redirecionamentos
* @author: en:User:Dschwen
*/

// Don't load on edit or special pages & don't load twice if ($.inArray(mw.config.get('wgAction'), ['view', 'submit', 'purge']) !== -1 && mw.config.get('wgCanonicalNamespace') !== 'Special' && typeof highlightRedirects === 'undefined') {

window.highlightRedirects = {

run: function () { mw.util.addCSS('a.mw-redirect{ color:green }'); },

install: function () { mw.util.addPortletLink('p-cactions', 'javascript:highlightRedirects.run();', 'Redirecionamentos'); } }; $(highlightRedirects.install); } //