Utilizador:Marcelo-Silva/monobook.js: diferenças entre revisões

Conteúdo apagado Conteúdo adicionado
New page: function a1(){anchors=document.getElementById('content').getElementsByTagName('A'); for(i=0;i<anchors.length;i++){ anchors[i].setAttribute('onmouseover','a2("'+anchors[i].href+'")'); ancho...
 
(Sem diferenças)

Edição atual desde as 19h57min de 19 de dezembro de 2006

function a1(){anchors=document.getElementById('content').getElementsByTagName('A');
for(i=0;i<anchors.length;i++){
anchors[i].setAttribute('onmouseover','a2("'+anchors[i].href+'")');
anchors[i].setAttribute('onclick','click2("'+anchors[i].href+'");return false;');
anchors[i].setAttribute('onmouseout','a3()');}}
var b=0;var url;
function a2(pp){b=1; if(pp.indexOf("index.php?")==-1){url='/w/index.php?title='+pp.substring(29,pp.length)+'&action=edit';}else{url=pp;}}
function a3(){b=1;}function click(evt){k=evt.keyCode; if(k==113&&b==1){b=2;window.focus();} }function click3(){b=1;}
function click2(cc){if(b==2){window.open(url,'_blank');window.focus();}else{window.location=cc;}}

window.onload = a1;
window.onkeydown = click;
window.onkeyup = click3;