Użytkownik:D@mi/monobook.js: Różnice pomiędzy wersjami

Z Nonsensopedii, polskiej encyklopedii humoru
M (hm)
M
 
(Nie pokazano 6 wersji utworzonych przez 3 użytkowników)
Linia 1: Linia 1:
//****************************************************************************************************************
//{{Użytkownik:Michalwadas/Nawigacja}}
function blockreasons() {
if(!document.getElementById('ipbreason-dropdown-js')) return;
var reasondiv = document.getElementById('ipbreason-dropdown-js');
var reasons = document.getElementById('ipbreason-dropdown-js').firstChild.nodeValue.split('\n');


var selsel = document.createElement('select');
selsel.setAttribute('onchange','blockreasonchange();');
selsel.setAttribute('id','blockreasonsel');
var firstop = document.createElement('option');
firstop.appendChild(document.createTextNode('Powody blokad'));
selsel.appendChild(firstop);


var groupop = new Array(); var gpn = 0;
//<pre>
var op = new Array(); var opn = 0;
// Oryginalna wersja [[wikipedia:pl:Wikipedia:Narzędzia/Navigation popups|Popups]]: [[wikipedia:en:User:Lupin/popups.js]]
for(var i=0;i<reasons.length;i++) {
// Proszę zachować powyższe informacje.
if(reasons[i].substring(0,1)=='*') {
document.write('<script type="text/javascript" src=" \
if(reasons[i].substring(0,2)=='**') {
http://nonsensopedia.wikia.com/index.php?title=Użytkownik:Michalwadas/NP.js \
op[opn] = document.createElement('option');
&action=raw&ctype=text/javascript&dontcountme=s"></script>');
op[opn].setAttribute('value',reasons[i].substring(2));
op[opn].appendChild(document.createTextNode(reasons[i].substring(2)));
//
groupop[gpn].appendChild(op[opn]);
// Ustawienia
opn++;
popupDelay=1; // opóźnienie w sekundach
} else {
popupFixRedirs=true; // naprawianie linków do przekierowań
if(groupop[gpn]) selsel.appendChild(groupop[gpn])
popupFixDabs=true; // naprawianie linków do stron ujednoznaczniających
gpn++;
popupRevertSummaryPrompt=true; // możliwość zmiany tekstu przy revertowaniu
groupop[gpn] = document.createElement('optgroup');
// Dołączenie skryptu ze strony: [[Wikipedysta:Nux/hideSidebar.js]]
groupop[gpn].setAttribute('label',reasons[i].substring(1));
document.write('<script type="text/javascript" src=" \
}
http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Nux/hideSidebar.js \
}
&action=raw&ctype=text/javascript&dontcountme=s"></script>');
}
selsel.appendChild(groupop[gpn]);

var reasonparent = document.getElementById('blockip').wpBlockReason.parentNode;
reasonparent.appendChild(document.createElement('br'));
reasonparent.appendChild(selsel);
}
if(wgPageName=='Specjalna:Blockip') addOnloadHook(blockreasons);

function blockreasonchange() {
var selsel = document.getElementById('blockreasonsel');
var reasonbox = document.getElementById('blockip').wpBlockReason;
if(selsel.selectedIndex == 0) return
reasonbox.value = selsel.options[selsel.selectedIndex].value;
}

var NavigationBarShowDefault = 0;

//****************************************************************************************************************

Aktualna wersja na dzień 23:54, 8 cze 2007

//****************************************************************************************************************
function blockreasons() {
  if(!document.getElementById('ipbreason-dropdown-js')) return;
  var reasondiv = document.getElementById('ipbreason-dropdown-js');
  var reasons = document.getElementById('ipbreason-dropdown-js').firstChild.nodeValue.split('\n');

  var selsel = document.createElement('select');
  selsel.setAttribute('onchange','blockreasonchange();');
  selsel.setAttribute('id','blockreasonsel');
  var firstop = document.createElement('option');  
  firstop.appendChild(document.createTextNode('Powody blokad'));
  selsel.appendChild(firstop);

  var groupop = new Array(); var gpn = 0;
  var op = new Array(); var opn = 0;
  for(var i=0;i<reasons.length;i++) {
    if(reasons[i].substring(0,1)=='*') {
    if(reasons[i].substring(0,2)=='**') {
      op[opn] = document.createElement('option');
      op[opn].setAttribute('value',reasons[i].substring(2));
      op[opn].appendChild(document.createTextNode(reasons[i].substring(2)));
      groupop[gpn].appendChild(op[opn]);
      opn++;
    } else {
      if(groupop[gpn]) selsel.appendChild(groupop[gpn])
      gpn++;
      groupop[gpn] = document.createElement('optgroup');
      groupop[gpn].setAttribute('label',reasons[i].substring(1));
    }
    }
  }
  selsel.appendChild(groupop[gpn]);

  var reasonparent = document.getElementById('blockip').wpBlockReason.parentNode;
  reasonparent.appendChild(document.createElement('br'));
  reasonparent.appendChild(selsel);
}
if(wgPageName=='Specjalna:Blockip') addOnloadHook(blockreasons);

function blockreasonchange() {
  var selsel = document.getElementById('blockreasonsel');
  var reasonbox = document.getElementById('blockip').wpBlockReason;
  if(selsel.selectedIndex == 0) return
  reasonbox.value = selsel.options[selsel.selectedIndex].value;
}

var NavigationBarShowDefault = 0; 

//****************************************************************************************************************