User:OrbiliusMagister/monobook.js

//

// User:Lupin/popups.js - please include this line

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

simplePopups=true;

// WikiSign

var wikisign_pre = '- '; var wikisign_post = ''; function WikiSign { arra = document.getElementsByTagName("a"); for ( i=0; i < arra.length;i++ ) { if ( arra[i].getAttribute("href") == "javascript:insertTags('--~',,);" ) { arra[i].setAttribute("href", "javascript:insertTags('"+wikisign_pre+"','"+wikisign_post+"','');"); break; } } } $(WikiSign);

// AddPurge

function addPurge{ var x = document.getElementById('ca-history'); if(!x) return; if(x.children) x = x.children[0].href; else x = x.childNodes[0].href; addTab(x.replace(/=history/, "=purge"), 'purge', 'ca-purge', 'Reload this page', 'g'); }

function addEditSection0{ if(!document.getElementById) return; var x = document.getElementById('ca-edit'); if(!x) return; var y = document.createElement('LI'); y.id = 'ca-edit-0'; if(x.className == 'selected'){ if(/&action=edit&section=0$/.test(window.location.href)){ x.className = 'istalk'; y.className = 'selected'; } else { x.className = 'selected istalk'; }   } else if(x.className == 'selected istalk'){ if(/&action=edit&section=0$/.test(window.location.href)){ x.className = 'istalk'; y.className = 'selected istalk'; } else { y.className = 'istalk'; }   } else { y.className = x.className; x.className = 'istalk'; }   var z = document.createElement('A'); if(x.children){ z.href = x.children[0].href + '&section=0'; z.appendChild(document.createTextNode('0')); y.appendChild(z); document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling); }else{ z.href = x.childNodes[0].href + '&section=0'; z.appendChild(document.createTextNode('0')); y.appendChild(z); document.getElementById('p-cactions').childNodes[3].insertBefore(y,x.nextSibling); }   z.title = 'Modifica la sezione zero di questa pagina'; akeytt; }

/*